A résolu


Min of a Matrix
Return the minimum value in the given matrix.

2 mois il y a

A résolu


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]; Request not to use d...

2 mois il y a

A résolu


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

2 mois il y a

A résolu


Box!
Given a box, find the volume of the cube. With each side = a.

2 mois il y a

A résolu


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

2 mois il y a

A résolu


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

2 mois il y a

A résolu


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

2 mois il y a

A résolu


Find Logic 15

2 mois il y a

A résolu


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

2 mois il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

2 mois il y a

A résolu


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

2 mois il y a

A résolu


Draw a '7' in a zero matrix!

2 mois il y a

A résolu


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

3 mois il y a

A résolu


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

3 mois il y a

A résolu


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...

3 mois il y a

A résolu


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

3 mois il y a

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

3 mois il y a

A résolu


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

3 mois il y a

A résolu


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

3 mois il y a

A résolu


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

3 mois il y a

A résolu


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

3 mois il y a

A résolu


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

3 mois il y a

A résolu


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

3 mois il y a

A résolu


Tax Calculator
Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

3 mois il y a

A résolu


frame of the matrix
Given the matrix M, return M without the external frame.

3 mois il y a

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Battery Life Estimation for a Device
A battery-powered device consumes a constant current while operating. The estimated battery life (T) can be calculated using the...

3 mois il y a

Charger plus