Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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]

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


modulus of a number
find the modulus of a given number

oltre 5 anni fa

Risolto


Values in Array
How many values are in the array

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


Radians to Degrees
Convert radians to degrees.

oltre 5 anni fa

Risolto


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.

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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.

oltre 5 anni fa

Risolto


BaeIsAlwaysRight
Output yes whatever bae says

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Carica altro