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
10765 Solvers
Project Euler: Problem 2, Sum of even Fibonacci
464 Solvers
Who knows the last digit of pi?
488 Solvers
Find Index of maximum Value and maximum Value of a vector
123 Solvers
312 Solvers