Consider a vector A such as
A = [1 2 3 3 4 5 6]
Can you convert this vector to a three-column matrix like this:
M = [1 2 3 2 3 3 3 3 4 3 4 5 4 5 6]
Swap the first and last columns
9887 Solvers
The Hitchhiker's Guide to MATLAB
2694 Solvers
138 Solvers
Sum the elements in either diagonal of a square matrix
144 Solvers
Sum of odd numbers in a matrix
231 Solvers