Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 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 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 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 8 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 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 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 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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.

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


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

casi 8 años hace

Cargar más