Solved

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1];

circa 6 anni ago

Solved

Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

circa 6 anni ago

Solved

The rabbit problem
Someone discovered that rabbits reproduce at the rate of fibonnaci so you just input the number and it will print the fibonnaci ...

circa 6 anni ago

Solved

Calculate the nth Fibonacci number USING 'Golden Ratio' concept
f = [1 1 2 3 5 8 13 ...] If n=6, f(6)=8

circa 6 anni ago

Solved

Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

circa 6 anni ago

Solved

calculate RMS voltage
given peak to peak voltage, calculate rms voltage

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

circa 6 anni ago

Solved

subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

circa 6 anni ago

Solved

Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

circa 6 anni ago

Solved

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

circa 6 anni ago

Solved

Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

circa 6 anni ago

Solved

Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

circa 6 anni ago

Solved

Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

circa 6 anni ago

Solved

Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

circa 6 anni ago

Solved

calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

circa 6 anni ago

Solved

Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

circa 6 anni ago

Solved

Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

circa 6 anni ago

Solved

Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

circa 6 anni ago

Solved

Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

circa 6 anni ago

Solved

Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

circa 6 anni ago

Solved

Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

circa 6 anni ago

Solved

Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

circa 6 anni ago

Solved

Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

circa 6 anni ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

circa 6 anni ago

Solved

07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

circa 6 anni ago

Solved

commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

circa 6 anni ago

Solved

Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

circa 6 anni ago

Solved

Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

circa 6 anni ago