Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


Calculate the logarithm of number
Calculate the logarithm of number x

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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.

fast 6 Jahre vor

Gelöst


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)

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


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

fast 6 Jahre vor

Gelöst


Find NaNs in the matrix
Return 1s wherever there is a NaN in the input matrix

fast 6 Jahre vor

Gelöst


Adding Numbers
Add the input numbers to the original.

fast 6 Jahre vor

Gelöst


Product of all elements in an array
Compute the product of all elements in an array.

fast 6 Jahre vor

Gelöst


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

fast 6 Jahre vor

Gelöst


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

fast 6 Jahre vor

Gelöst


'Absolute value'
Create a function called own_abs, which is the absolute number entered as the input return value.

fast 6 Jahre vor

Gelöst


Percentage of zeros in a matrix of only 1s and 0s
Write a function called _zero_stat_ that takes a matrix as an input that only has 0 and 1 elements. The function needs to comput...

fast 6 Jahre vor

Gelöst


find number of times of occurrence of the most frequent number in a row vector
In a given row vector, find the number of times a mode of a row vector has occurred example: in [2 5 5 5 5 3], output is 4 ...

fast 6 Jahre vor

Mehr laden