A résolu


Reduce the logic
We have three logical input, x,y and z. The output is: y = ((x&y)|z)&((z|x&y)|(z&y|x))|((x&z)|z)&((y|x&z)|(z&x|y))|(x|y|z) ...

environ 7 ans il y a

A résolu


For a rectangle, if x is the length and 2x is width. Then find out x from the area of the rectangle?
For a rectangle, if x is the length and 2x is the width. Then find out x from the area of the rectangle? if the area is equal...

environ 7 ans il y a

A résolu


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

environ 7 ans il y a

A résolu


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

environ 7 ans il y a

A résolu


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

environ 7 ans il y a

A résolu


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

environ 7 ans il y a

A résolu


Product of all elements in an array
Compute the product of all elements in an array.

environ 7 ans il y a

A résolu


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

environ 7 ans il y a

A résolu


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

environ 7 ans il y a

A résolu


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

environ 7 ans il y a

A résolu


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

environ 7 ans il y a

A résolu


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

environ 7 ans il y a

A résolu


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

environ 7 ans il y a

A résolu


Divide polynomial p1 by p2.
Divide polynomial p1 by p2 given as vectors. Return result q and r vectors which corresponds the quotient and remainder of divis...

environ 7 ans il y a

A résolu


Calculate the volume of the cube.
Example n = 3; a = volume(n); a = 27

environ 7 ans il y a

A résolu


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

environ 7 ans il y a

A résolu


Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...

environ 7 ans il y a

A résolu


Normalize by maximum
Subtract the maximum value in a column from the corresponding columns of a matrix.

environ 7 ans il y a

A résolu


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

environ 7 ans il y a

A résolu


Dots in a Circle
Return how many integer grid points there are inside a circle of radius _r_ centred at (0,0) (including points on the edge). ...

environ 7 ans il y a

A résolu


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

environ 7 ans il y a

A résolu


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

environ 7 ans il y a

A résolu


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

environ 7 ans il y a

A résolu


0<=x<=pi?
Check whether the given angle is between zero and pi. Return logical true or false.

environ 7 ans il y a

A résolu


Get derivarive of polynomial given as vector array.
Get derivarive of polynomial given as vector array. Example p=[ 1 2 0 5 0 3 ]; result=[ 5 8 0 10 ...

environ 7 ans il y a

A résolu


Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix. Example n=3 Matrix= [ 8 1 6; 3 5 7; 4 ...

environ 7 ans il y a

A résolu


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

environ 7 ans il y a

A résolu


Determine if given number is perfect
A number is <http://en.wikipedia.org/wiki/Perfect_number perfect> if it is equal to the sum of its factors, excluding itself. ...

environ 7 ans il y a

A résolu


Find the rank of a matrix
Determine the rank of a matrix without using the MATLAB function of the same name.

environ 7 ans il y a

A résolu


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

environ 7 ans il y a

Charger plus