
Re: Delete and insert row in different matrix
Posted:
Aug 20, 2013 3:00 PM


On 8/20/2013 12:16 PM, John Dickson wrote: > Hi I am trying to delete ith row from A matrix and insert the same row in B matrix, >is it possible in matlab? > I am successful in deleting the ith row using A(i,:)=[] > Not sure how to insert the same deleted row into another matrix B. > Any help is appreciated. > > Thanks >
 clear all A = rand(5); B = rand(5); i = 3; % handling corner cases of 1 and end left as exercise B = [B(1:i1,:); A(i,:) ; B(i:end,:)] A(i,:) = []; 
Nasser

