Risolto


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

quasi 8 anni fa

Risolto


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

quasi 8 anni fa

Risolto


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

quasi 8 anni fa

Risolto


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

quasi 8 anni fa

Risolto


find "greatest common divisor" of two integer value
A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96 output should be +6 x=-18; y=96; >>your...

quasi 8 anni fa

Risolto


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

quasi 8 anni fa

Risolto


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

quasi 8 anni fa

Risolto


Replace x value into y value in string text.
Replace x value into y value in string text. Example text='Hello World' x='World', y='Universe' result='Hello Universe'.

quasi 8 anni fa

Risolto


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

quasi 8 anni fa

Risolto


Low level NaN
* I have a dataset. Columns represents different variables. * A variable may start with NaN or any double type number. * If i...

quasi 8 anni fa

Risolto


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

quasi 8 anni fa

Risolto


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

quasi 8 anni fa

Risolto


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

quasi 8 anni fa

Risolto


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

quasi 8 anni fa

Risolto


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

quasi 8 anni fa

Risolto


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

quasi 8 anni fa

Risolto


Find the outcast
All pairs have the same difference except for one. Output the index of the latter Example: input =[0 1; 1 0; ...

quasi 8 anni fa

Risolto


Calculate the logarithm of number
Calculate the logarithm of number x

quasi 8 anni fa

Risolto


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

quasi 8 anni fa

Risolto


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

quasi 8 anni fa

Risolto


Find the mode of the given input
Find the statistical <http://en.wikipedia.org/wiki/Mode_(statistics)/ mode> of the given input. Example: If X is matr...

quasi 8 anni fa

Risolto


Adding Cells with numbers defined as strings
Given a cell, with strings representing numbers, add each value. For example: a = {'9','33'}; the output should be: ...

quasi 8 anni fa

Risolto


determine amount cookies left
started with 3 cookies and you never ate any how many are left

quasi 8 anni fa

Risolto


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

quasi 8 anni fa

Risolto


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

quasi 8 anni fa

Risolto


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

quasi 8 anni fa

Risolto


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

quasi 8 anni fa

Risolto


Replace Nan!
Replace Nan in the given vector(v) with 9999.

quasi 8 anni fa

Risolto


Replicate and Tile an Array
Replicate and tile an array. Example A = [1 2 3; 4 5 6; 7 8 9] B = Epli_and_Tile(A,1,2) B = [ 1 2 3 1...

quasi 8 anni fa

Risolto


Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

quasi 8 anni fa

Carica altro