Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so:
m=[1 3 6 9 11;
3 6 9 11 0;
6 9 11 0 0;
9 11 0 0 0;
11 0 0 0 0]
That way a tiny motorcycle stuntman can follow the trace and jump over 9 school buses safely.
the third test case has a syntax error
yes, it is fixed now :)
This is my favorite problem title so far!
credit should goes to matlab's built-in function not to programmer
Find the peak 3n+1 sequence value
Find the largest value in the 3D matrix
Determine Whether an array is empty
Maximum value in a matrix
Add offset to a signal
Snakes on a plane
Let's do Markov Chains!
You LOVES Matlab 41%
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office