From: Natalie Sin Hwee on 29 Mar 2010 18:58 Hiya, i have a matrix of random 0 and 1s in a 1000-by-1000. how can i 'find' all the elements that contain 1's in only column 1? ( i will apply it to each column seperately) at the moment i have [r1,c1]=find(A~=1) but that gives me a x-by-2 matrix of the element row and column position. as i want to separate them out into values from column 1,2....1000. cheers! Natalie
From: Matt Fig on 29 Mar 2010 19:24 A = round(rand(5)) find(A(:,1)) Depending on what you are going to do with the data, this may not be what you want to do.
From: Natalie Sin Hwee on 29 Mar 2010 19:38 "Matt Fig" <spamanon(a)yahoo.com> wrote in message <horcrl$imt$1(a)fred.mathworks.com>... > A = round(rand(5)) > > find(A(:,1)) > > Depending on what you are going to do with the data, this may not be what you want to do. === hey matt! exactly what i wanted!!!! thanks a billllion!!! Natalie
|
Pages: 1 Prev: VTK Activiz .NET in Matlab Next: Poisson problem in a rectangle |