A résolu


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

plus de 5 ans il y a

A résolu


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

plus de 5 ans il y a

A résolu


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

plus de 5 ans il y a

A résolu


imaginary results
Return the value of the imaginary number i to the power of input argument n.

plus de 5 ans il y a

A résolu


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

plus de 5 ans il y a

A résolu


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

plus de 5 ans il y a

A résolu


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

plus de 5 ans il y a

A résolu


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

plus de 5 ans il y a

A résolu


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

plus de 5 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 ...

plus de 5 ans il y a

A résolu


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

plus de 5 ans il y a

A résolu


Decide whether determinant is zero.
Given a 3 x 3 matrix, find the determinant. Let y = true if the determinant is zero, and let y = false if the determinant is no...

plus de 5 ans il y a

A résolu


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

plus de 5 ans il y a

A résolu


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

plus de 5 ans il y a

A résolu


modulus of a number
find the modulus of a given number

plus de 5 ans il y a

A résolu


Values in Array
How many values are in the array

plus de 5 ans il y a

A résolu


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

plus de 5 ans il y a

A résolu


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

plus de 5 ans il y a

A résolu


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

plus de 5 ans il y a

A résolu


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

plus de 5 ans il y a

A résolu


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

plus de 5 ans il y a

A résolu


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

plus de 5 ans il y a

A résolu


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

plus de 5 ans il y a

A résolu


Radians to Degrees
Convert radians to degrees.

plus de 5 ans il y a

A résolu


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

plus de 5 ans il y a

A résolu


Where is she?
Given the numbers 12, 3, 6, 9 Tell where the girl is located. That is: Look to your 3 o'clock = look right Example ...

plus de 5 ans il y a

A résolu


find the relation...
if given input is 1, output is 4. if input is 55, output is 3136.

plus de 5 ans il y a

A résolu


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

plus de 5 ans il y a

A résolu


BaeIsAlwaysRight
Output yes whatever bae says

plus de 5 ans il y a

A résolu


row removal
Remove the nth row from input matrix M and return the resulting matrix in output N.

plus de 5 ans il y a

Charger plus