Prev: Training in Embedded system,Matlab,Robotics
Next: How to surface plots over 3d models in MATLAB?
From: Richard on 7 May 2010 07:04 Hi, how do I sort rows in a cell array by a specific column value.... i.e. My array contains 50 rows and 10 columns. Column 5 in each row contains a (hopefully)unique number. How can I sort my cell rows by reordering them so that they are placed in order of the magnitude of the value in column 5?
From: Loren Shure on 7 May 2010 07:37 In article <hs0s34$pc$1(a)fred.mathworks.com>, REMOVETHISrcaldwellie(a)yahoo.com says... > Hi, how do I sort rows in a cell array by a specific column value.... > i.e. > My array contains 50 rows and 10 columns. Column 5 in each row contains a (hopefully)unique number. How can I sort my cell rows by reordering them so that they are placed in order of the magnitude of the value in column 5? > Look at the help for sortrows, particularly the 2nd syntax. Good examples on that reference page that are relevant as well. -- Loren http://blogs.mathworks.com/loren http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Richard on 7 May 2010 08:35 Loren Shure <loren.shure(a)mathworks.com> wrote in message <MPG.264dc587e8cc5f74989ae8(a)news.mathworks.com>... > In article <hs0s34$pc$1(a)fred.mathworks.com>, > REMOVETHISrcaldwellie(a)yahoo.com says... > > Hi, how do I sort rows in a cell array by a specific column value.... > > i.e. > > My array contains 50 rows and 10 columns. Column 5 in each row contains a (hopefully)unique number. How can I sort my cell rows by reordering them so that they are placed in order of the magnitude of the value in column 5? > > > > Look at the help for sortrows, particularly the 2nd syntax. Good > examples on that reference page that are relevant as well. > > -- > Loren > http://blogs.mathworks.com/loren > http://matlabwiki.mathworks.com/MATLAB_FAQ Thanks v. much. Didnt know that would work with cell arrays!!
|
Pages: 1 Prev: Training in Embedded system,Matlab,Robotics Next: How to surface plots over 3d models in MATLAB? |