A résolu


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

presque 8 ans il y a

A résolu


Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

presque 8 ans il y a

A résolu


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

presque 8 ans il y a

A résolu


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

presque 8 ans il y a

A résolu


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

presque 8 ans il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

presque 8 ans il y a

A résolu


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...

presque 8 ans il y a

A résolu


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

presque 8 ans il y a

A résolu


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


surface of a spherical planet
you just discovered its circumference, that is the input.

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

presque 8 ans il y a

A résolu


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...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


convert matrix to single column
given any matrix, convert it to single column

presque 8 ans il y a

A résolu


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

presque 8 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

presque 8 ans il y a

A résolu


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

presque 8 ans il y a

A résolu


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

presque 8 ans il y a

A résolu


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

presque 8 ans il y a

A résolu


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

presque 8 ans il y a

A résolu


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

presque 8 ans il y a

A résolu


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

presque 8 ans il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

presque 8 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

presque 8 ans il y a

A résolu


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

presque 8 ans il y a

A résolu


matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

presque 8 ans il y a

Charger plus