From: roya olyazadeh on 19 May 2010 01:31 I wan to remove zero elements from my matrix like this : A = [ 1 0 0 0 5 6 0 0 0 10 ] then : A = [ 1 5 6 10 ]
From: James Tursa on 19 May 2010 02:04 "roya olyazadeh" <roya2543(a)gmail.com> wrote in message <hsvt3d$8cs$1(a)fred.mathworks.com>... > I wan to remove zero elements from my matrix like this : > > A = [ 1 0 0 0 5 6 0 0 0 10 ] > then : > A = [ 1 5 6 10 ] A(A~=0) James Tursa
From: us on 19 May 2010 02:33 "roya olyazadeh" <roya2543(a)gmail.com> wrote in message <hsvt3d$8cs$1(a)fred.mathworks.com>... > I wan to remove zero elements from my matrix like this : > > A = [ 1 0 0 0 5 6 0 0 0 10 ] > then : > A = [ 1 5 6 10 ] one of the many other solutions v=[1,0,0,2,nan,3] v(v==0)=[] us
From: Matt J on 19 May 2010 04:25 nonzeros(A);
|
Pages: 1 Prev: Export figures to bmp or jpg. Change bit depth or size Next: Pixel Scan |