Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 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 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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.

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Carica altro