Solved

Monty Hall
The classic Monty Hall "Let's Make a Deal" final showcase puzzle pits the contestant against three Doors. Behind one Door are dr...

Solved

First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

Solved

Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

Problem

SatCom #6: Inclination of a Sun-Synchronous Orbit
*Satellite and Space Engineering - Problem #5* _This is part of a series of problems looking at topics in satellite and space...

7 månader ago | 1 | 3 solvers

Solved

The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

Solved

Square root of number
Square root of given number.

Solved

Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

Solved

Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

Problem

SatCom #5: Determine Elliptical Orbit Parameters
*Satellite and Space Engineering - Problem #5* _This is part of a series of problems looking at topics in satellite and space...

7 månader ago | 1 | 4 solvers

Solved

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

Solved

Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

Solved

Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

Solved

Box
Give the volume of a box, x is equal to the body diagonal.

Solved

Square
X is a number, write a code, where Y should be the square of X.

Solved

Simple Matrix
Make the following matrix without typing it in one by one. [1 2 3; 2 4 6; 4 8 12] x=[1 2 3].

Solved

Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

Solved

Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row. Example: X=[1;2;3...

Solved

Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother. X=[1 2 3;4 5 6;7 8 9] Y=[2 1 3;5 4 6;8 7 9]

Solved

Matrix problem for beginners
Make a matrix [0,0,0;1,1,1;2,2,2]. X=[0,1,2]

Solved

Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...

Solved

Matrix for beginners
Multiply x and y elemwise.

Solved

Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

Solved

Reverse a matrix
Its simple. You have to reverse a given matrix.

Solved

Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

Solved

Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

Solved

Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

Solved

Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

Solved

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

Solved

Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...