davyzhu
Advanced Member level 1

matlab invert vector
How to invert the vector?
For example,
x=[1 2 3 4 5];
And I want y = [5 4 3 2 1];
But y(5:1)=x(1:5) seems cannot do that work.
Any suggestions will be appreciated!
Davy
How to invert the vector?
For example,
x=[1 2 3 4 5];
And I want y = [5 4 3 2 1];
But y(5:1)=x(1:5) seems cannot do that work.
Any suggestions will be appreciated!
Davy