Prev: www.voguesneakers.com Cheap Jordans,Cheap Nike Shox R4,Cheap Nikes
Next: R2007a memory not released until UI context switch
From: Kenneth Galea on 5 Apr 2010 07:50 Hi everyone I have the following data: parallel = [3,1;4,1;5,1;6,2;1,3;1,4;1,5;2,6] In this case 3,1 and 1,3 mean the same thus I need to remove 1,3....and same for all others. Is there a function to do this in Matlab?? Regards Kenneth
From: Sean on 5 Apr 2010 08:18 "Kenneth Galea" <k.galea(a)hotmail.com> wrote in message <hpcipf$cmn$1(a)fred.mathworks.com>... > Hi everyone > I have the following data: > parallel = [3,1;4,1;5,1;6,2;1,3;1,4;1,5;2,6] > > In this case 3,1 and 1,3 mean the same thus I need to remove 1,3....and same for all others. Is there a function to do this in Matlab?? If order along the 1st dimension doesn't matter: b = sort(parallel','ascend')'; c = unique(b,'rows'); If it does: [trash idx] = unique(b,'rows'); c = a(sort(idx),:)
From: us on 5 Apr 2010 08:27 "Kenneth Galea" <k.galea(a)hotmail.com> wrote in message <hpcipf$cmn$1(a)fred.mathworks.com>... > Hi everyone > I have the following data: > parallel = [3,1;4,1;5,1;6,2;1,3;1,4;1,5;2,6] > > In this case 3,1 and 1,3 mean the same thus I need to remove 1,3....and same for all others. Is there a function to do this in Matlab?? > > Regards > Kenneth a hint: help unique; us
From: Kenneth Galea on 5 Apr 2010 08:30
"Sean " <sean.dewolski(a)Idontwantspam.umit.maine.edu> wrote in message <hpckds$5jm$1(a)fred.mathworks.com>... > "Kenneth Galea" <k.galea(a)hotmail.com> wrote in message <hpcipf$cmn$1(a)fred.mathworks.com>... > > Hi everyone > > I have the following data: > > parallel = [3,1;4,1;5,1;6,2;1,3;1,4;1,5;2,6] > > > > In this case 3,1 and 1,3 mean the same thus I need to remove 1,3....and same for all others. Is there a function to do this in Matlab?? > > If order along the 1st dimension doesn't matter: > b = sort(parallel','ascend')'; > c = unique(b,'rows'); > > If it does: > [trash idx] = unique(b,'rows'); > c = a(sort(idx),:) Thanks for yor excellent reply. Regards Kenneth |