octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how reverse the array sequence


From: Nicholas Jankowski
Subject: Re: how reverse the array sequence
Date: Tue, 17 Jul 2018 15:41:17 -0400


a=[1 3 4 5 5 6 7 8]

i want this:


a=[8 7 6 5 4 3 2 1]




>> a = 1:5
a =

   1   2   3   4   5

>> a(end:-1:1)
ans =

   5   4   3   2   1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]