Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n.
Example
x= [ 1 2 3...
3 years 前
已解决
Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15.
Given a temperature in Kelvin, return the equivalent temperature in Celsius.
Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
3 years 前
已解决
How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1.
Examples:
Input...
3 years 前
已解决
Convert a Cell Array into an Array
Given a square cell array:
x = {'01', '56'; '234', '789'};
return a single character array:
y = '0123456789'