Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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]

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


modulus of a number
find the modulus of a given number

mehr als 7 Jahre vor

Gelöst


Values in Array
How many values are in the array

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


Radians to Degrees
Convert radians to degrees.

mehr als 7 Jahre vor

Gelöst


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.

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Gelöst


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.

mehr als 7 Jahre vor

Gelöst


BaeIsAlwaysRight
Output yes whatever bae says

mehr als 7 Jahre vor

Gelöst


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

mehr als 7 Jahre vor

Mehr laden