Resuelto


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

más de 4 años hace

Resuelto


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

más de 4 años hace

Resuelto


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

más de 4 años hace

Resuelto


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

más de 4 años hace

Resuelto


Converts numbers into characters
Converts numbers into characters

más de 4 años hace

Resuelto


the average value of the elements
Calculate the average value of the elements in the array

más de 4 años hace

Resuelto


easy problem
Find the last element of the array

más de 4 años hace

Resuelto


calculate the length of matrix
input 1 array, calculate the length

más de 4 años hace

Resuelto


Find the max element of the array
Find the max element of the array

más de 4 años hace

Resuelto


Calculate the square root of a number
Input a Output b = srt(a)

más de 4 años hace

Resuelto


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

más de 4 años hace

Resuelto


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

más de 4 años hace

Resuelto


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

más de 4 años hace

Resuelto


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

más de 4 años hace

Resuelto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

más de 4 años hace

Resuelto


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

más de 4 años hace

Resuelto


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

más de 4 años hace

Resuelto


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

más de 4 años hace

Resuelto


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

más de 4 años hace

Resuelto


square root
Find the square root (y) of an input (x).

más de 4 años hace

Resuelto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

más de 4 años hace

Resuelto


Matlab Basics - y as a function of x
Write a function to calculate y as a function of x, such that y = 6x^2 + 5x - 2

más de 4 años hace

Resuelto


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

más de 4 años hace

Resuelto


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

más de 4 años hace

Resuelto


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

más de 4 años hace

Resuelto


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

más de 4 años hace

Resuelto


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

más de 4 años hace

Resuelto


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

más de 4 años hace

Resuelto


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

más de 4 años hace

Resuelto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

más de 4 años hace

Cargar más