MATLAB: Append rows at the end of Matrix append rows Hi, a = [1 2 3 ; 4 5 6; 7 8 9]; –> 3×3 matrix I want to insert at the end number of raws with same elements such as [5 5 5] and make the matrix 10 x 3 i.e. I want to insert 7 more raws with [5 5 5]. Please explain. Best Answer a = [1 2 3 ; 4 5 6; 7 8 9];b=[5 5 5] c=[a;b]% add one rowc=[a;repmat(b,7,1)] %add 7rows Related SolutionsMATLAB: Merge matrices by matching first column values in MATLAB A= [4 5.3 5 7.3 8 2.5 9 4.7];B= [1 3.6 0.4 2 3.9 0.6 3 9.2 0.9 4 5.1 0.1 5 0.7 0.5 6 8.3 0.7 7 7.3 0.2 8 1.6 0.6 9 4.6 0.2];[~,ia,ib] = intersect(A(:,1),B(:,1));C = [A(ia,1:2),B(ib,2:3)] MATLAB: Comparing two matrix for similar matrix a = [1 2 3];b = [1 2 3; 4 5 6; 7 8 9];i = ismember(b , a, 'rows');c = b(~i,:) Related QuestionReplacing row values from another matrixSomone can help me with unique and find functionHelp running Matlab scriptMatrix manipulation problem under MATLAB
Best Answer