From: Kai on 28 Apr 2010 12:46 "someone" <someone(a)somewhere.net> wrote in message <hr9ldh$5uc$1(a)fred.mathworks.com>... > "Kai " <kai.voges.nospam(a)gmx.net> wrote in message <hr9kot$mhf$1(a)fred.mathworks.com>... > > Hello, > > > > I have a basic problem here, I am trying to solve for hours now. Here it comes: > > A = ones(100, 4) > > b = [23 30 60] > > > > Now I want to remove the rows specified in b from A with logical indexing. > > For a row vector, like A=ones(100, 1) it is clear that: > > A = A(A~=b); > > removes the specified rows. But how does it work for a matrix? I tried this: > > > > A = A(A~=b, :) and some others; without success. > > > > % How about > A = ones(100, 4); > b = [23 30 60]; > A(b,:) = []; > size(A) > > ans = > > 97 4 > > > Can someone provide me with the correct expression. > > > > Thanks in advance, > > Kai Thank you so much. I just dont have the time at this moment to test, but if it's this, I need some punishment or pain. greetz, kai
|
Pages: 1 Prev: s-function within s-function Next: pseudo inverse of rank 1 or rank deficient matrix |