|
|
Re: Insert row in an array and delete last row
Posted:
Jan 20, 2013 11:20 AM
|
|
dpb <none@non.net> wrote in message <kdh3ek$g4s$1@speranza.aioe.org>... > That's likely going to be highly costly in terms of temporaries if > you're doing this often to do that, specifically. Instead of moving L, > just create N as > > N=[R; L(1:end-1,:)]; clear L > > In place you can try > > L=circshift(L,1); L(1,:)=R; > > or permutations of the above idea but I suspect they'll be slower than > the previous although you can test it out... > > -- >
Thanks for the reply. By R you symbolize the newly created row vector i suppose.
Moreover, in case i wanted to perform a check on whether this row vector already exists in the matrix, how should i implement it? I have tried the ismember function but it does not fit my problem.
|
|