How do I reverse a vector?

6 visualizzazioni (ultimi 30 giorni)
Arthik Adla
Arthik Adla il 16 Feb 2015
Risposto: Roger Stafford il 16 Feb 2015
For example, how would I change x=[1 2 3 4] to x=[ 4 3 2 1]?

Risposte (1)

Roger Stafford
Roger Stafford il 16 Feb 2015
x = fliplr(x);

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by