Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...
Half-Swap
Given a vector with an even number of elements,
rearrange it so that the elements in its first
half are switched with those i...
約5年 前
解決済み
Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.
約5年 前
解決済み
Change on Spiral Matrix
n>=3, generate a matrix of nth such that n^2 is the max number, and max number must be in [1,1] or [end, end]. One example will ...
約5年 前
解決済み
Find the number of rectangles
There is a m*n grade given. Find the number of rectangles in the grid. Remember, a square is also a rectangle.
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...
約5年 前
解決済み
Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....
約5年 前
解決済み
Another colon problem
This is simple problem based on problems 555, 801, 1118, etc.
Create an index vector from two input vectors.
Example:
...
約5年 前
解決済み
How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs.
Given vector of num...
Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...
約5年 前
解決済み
Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...
Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...
約5年 前
解決済み
Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure.
Hint: <https://en.wi...