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
Count from 0 to N^M in base N.
Get the elements of diagonal and antidiagonal for any m-by-n matrix
You LOVES Matlab 41%
Snakes on a plane
Let's do Markov Chains!
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