a=[]1 2 3] iwant b=[3 2 1] this is an example i want for a general row vector

 Accepted Answer

Stephen23
Stephen23 on 5 Aug 2016
Edited: Stephen23 on 5 Aug 2016
a = [1 2 3]
fliplr(a)
or
a(end:-1:1)

More Answers (1)

How about doing a search in the help for flip?
docsearch flip
Lo and behold the first hit is what you want. Not surprisingly, the function is called flip.

Categories

Find more on Function Creation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!