Solved

the average value of the elements

Calculate the average value of the elements in the array

2 months ago

Solved

Determine if input is a perfect number

A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

2 months ago

Solved

Find the area of a rectangle if length of the diagonal is given.

if length of a diagnonal in rectangle is 5. Its area is 12.

2 months ago

Solved

find the relation...

if given input is 1, output is 4. if input is 55, output is 3136.

2 months ago

Solved

Test if a matrix is symmetric

Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

2 months ago

Solved

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

2 months ago

Solved

Matrix FUN

Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

2 months ago

Solved

Counting votes

x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

2 months ago

Solved

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

2 months ago

Solved

Remove multiples of N

in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

2 months ago

Solved

sum of ASCII

Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

2 months ago

Solved

Sum the real and imaginary parts of a complex number

Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

2 months ago

Solved

vector to string

Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

2 months ago

Solved

Count the numbers

In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

2 months ago

Solved

Odd times 3

Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

2 months ago

Solved

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

2 months ago