reordering columns of matrix according to a row

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

fuertes
Posts: 3
Joined: Fri Mar 04, 2011 4:06 pm

reordering columns of matrix according to a row

Postby fuertes » Fri Mar 04, 2011 4:31 pm

Dear EViews Forum users,

Let A denote a 2x3 matrix. I would like to sort (reorder) the columns of A according to the elements in the 3rd row from smallest to largest, ie if matrix A is
2 5 6
7 -2 4
3 2 7

the new sorted matrix would be

5 6 2
-2 4 7
2 7 3

Gauss has simple functions to do this. I would be surprised if EViews has not but I have been unable to find such function in the help manuals.

thank you very much

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: reordering columns of matrix according to a row

Postby EViews Gareth » Fri Mar 04, 2011 4:34 pm

Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 24 guests