Solved


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

15 years ago

Solved


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

15 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

15 years ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

15 years ago

Solved


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

15 years ago

Solved


give nth decimal place of pi
max 15th place after the decimal point is ok for now

15 years ago

Solved


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

15 years ago

Solved


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

15 years ago

Solved


inner product of two vectors
inner product of two vectors

15 years ago

Solved


Least common multiple of many numbers
1:6 -> 60

15 years ago

Solved


surface of a spherical planet
you just discovered its circumference, that is the input.

15 years ago

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

15 years ago

Solved


Lose control
Remove all characters that are below space in ASCII value.

15 years ago

Solved


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

15 years ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

15 years ago

Solved


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

15 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

15 years ago

Solved


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

15 years ago

Solved


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

15 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

15 years ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

15 years ago

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

15 years ago

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

15 years ago

Solved


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

15 years ago

Solved


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

15 years ago

Solved


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

15 years ago

Solved


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

15 years ago

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

15 years ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

15 years ago

Solved


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

15 years ago

Load more