Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Sorting 3D Data
Date: Thu, 19 Mar 2009 14:18:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 1
Message-ID: <gptk6q$4jp$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237472282 4729 172.30.248.35 (19 Mar 2009 14:18:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 19 Mar 2009 14:18:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1677649
Xref: news.mathworks.com comp.soft-sys.matlab:526133

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.