From: "John D'Errico" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Sorting 3D Data
Date: Thu, 19 Mar 2009 14:59:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 7
Message-ID: <gptmjl$ofq$>
References: <gptk6q$4jp$>
Reply-To: "John D'Errico" <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1237474741 25082 (19 Mar 2009 14:59:01 GMT)
NNTP-Posting-Date: Thu, 19 Mar 2009 14:59:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: comp.soft-sys.matlab:526156

"Medha Jani" <> wrote in message <gptk6q$4jp$>...
> I have my data as a 3d matrix A(150x120x240) or A(i,j,k) containing positional coordinates x,y,z of an object. Here, the element A(1,1,1) contains the x-,y- and z-coordinates of an object. I want to sort this data, but there is one problem. I cannot use the sort functions as that would lead to complete rearrangement of coordinates and the corresponding positions of x,y and z would be lost. Can anyone suggest a way that I can sort this data according to either the first dimension or second dimension or third dimension, but the corresponding other two dimensions must also change with it and the positional coordinates are not lost.

help sortrows