Opposite column order

Helpful hints, useful features you may not be aware of, and more

Opposite column order

Unread postby Esteban » Thu Jun 20, 2019 3:58 pm


Is there a way in which you could change, the column order to exactly the opposite.

What I mean is, I want this:


To become this:


I will be useful if it works for both the columns and the rows of a matrix.

Posts: 10
Joined: Tue May 14, 2019 12:13 pm

Re: Opposite column order

Unread postby TomDoan » Thu Jun 20, 2019 10:19 pm

dec rect b(%rows(a),%cols(a))
ewise b(i,j)=a(%rows(a)+1-i,j)

will make B a copy of A with the rows reversed. You can do the analogous operation with the columns. (You can also do the rows and columns together).
Posts: 7457
Joined: Wed Nov 01, 2006 5:36 pm

Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 3 guests