Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g.
x = [0 5; 10 3; 20 15; 16 19; 25 25]
contains...
約7年 前
解決済み
Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...
約7年 前
解決済み
Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...
約7年 前
解決済み
Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...
約7年 前
解決済み
Sudoku square
We have a small Sudoku square, but one number is missing.
x = [ 1 5 4
8 6 3
0 9 7 ]
Make a function, wher...
約7年 前
解決済み
Inscribed Pentagon?
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...
Circle/Pentagon Overlap
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...
約7年 前
解決済み
Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...
約7年 前
解決済み
Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.
約7年 前
解決済み
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
約7年 前
解決済み
Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
約7年 前
解決済み
Summation of array
Given an array, Find the sum of all of the elements in it
Examples:
Input x = [1 2 3 5; 4 5 6 7];
Output y is 33
約7年 前
解決済み
Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?;
x = [1 : 0.5 : 6];
y ...
約7年 前
解決済み
Cumulative product of a vector
Cumulative product of a vector
example
x=[1 2 5 10], then answer must be [ 1 2 10 100]
*If you like this prob...