Resuelto


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

casi 13 años hace

Resuelto


Return area of square
Side of square=input=a Area=output=b

casi 13 años hace

Resuelto


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

casi 13 años hace

Resuelto


inner product of two vectors
inner product of two vectors

casi 13 años hace

Resuelto


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

casi 13 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

casi 13 años hace

Resuelto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

casi 13 años hace

Problema


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

casi 13 años hace | 1 | 242 solvers

Resuelto


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

casi 13 años hace

Resuelto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

casi 13 años hace

Resuelto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

casi 13 años hace

Resuelto


kmph to mps
convert kilometer per hour to meter per second

casi 13 años hace

Resuelto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

casi 13 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; ...

casi 13 años hace

Resuelto


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

casi 13 años hace

Resuelto


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

casi 13 años hace

Resuelto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

casi 13 años hace

Resuelto


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

casi 13 años hace

Resuelto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

casi 13 años hace

Resuelto


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

casi 13 años hace

Resuelto


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

casi 13 años hace

Resuelto


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

casi 13 años hace

Resuelto


Find max
Find the maximum value of a given vector or matrix.

casi 13 años hace

Resuelto


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

casi 13 años hace

Resuelto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

casi 13 años hace

Resuelto


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

casi 13 años hace

Resuelto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

casi 13 años hace

Resuelto


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

casi 13 años hace

Resuelto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

casi 13 años hace

Resuelto


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

casi 13 años hace

Cargar más