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

14 years ago

Problem


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

14 years ago | 1 | 188 solvers

Solved


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

14 years ago

Solved


exactly?
given two strings of numeric expressions such as '1-7/14' and '11/22+0.2^2', return 1 if they are numerically exactly equal othe...

14 years ago

Problem


polar inertia
given locations of a set of unit masses on complex plane, find polar moment of inerta about the origin. for example output 4 if ...

14 years ago | 2 | 65 solvers

Solved


polar inertia
given locations of a set of unit masses on complex plane, find polar moment of inerta about the origin. for example output 4 if ...

14 years ago

Problem


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

14 years ago | 19 | 4319 solvers

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

14 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

14 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

14 years ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

14 years ago

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

14 years ago

Solved


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

14 years ago

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

14 years ago

Solved


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

14 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

14 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

14 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

14 years ago

Solved


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]; and ...

14 years ago

Problem


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

14 years ago | 0 | 116 solvers

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

14 years ago

Solved


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

14 years ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

14 years ago

Problem


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

14 years ago | 1 | 144 solvers

Problem


chance in percent for minimum K heads when a good coin is tossed N times?
For example, chance is 100% for minimum 0 heads when a coin is tossed 7 times. Chance is 50% for minimum 2 heads when a coin is...

14 years ago | 1 | 53 solvers

Solved


chance in percent for minimum K heads when a good coin is tossed N times?
For example, chance is 100% for minimum 0 heads when a coin is tossed 7 times. Chance is 50% for minimum 2 heads when a coin is...

14 years ago

Solved


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

14 years ago

Problem


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

14 years ago | 1 | 95 solvers

Solved


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

14 years ago

Problem


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

14 years ago | 1 | 140 solvers

Load more