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
144 Solvers
Solve the set of simultaneous linear equations
171 Solvers
Return elements unique to either input
475 Solvers
Basics: 'Find the eigenvalues of given matrix
257 Solvers
385 Solvers