MATLAB: How to insert rows into a matrix inserting rows Hi I have a matrix (748*6). I need to insert one row after every 3rd row. How should I do that? the resulting martix should be (1126 *6). Thank you Best Answer If the details with the size of the output are cleared, something like this will solve the problem:A = rand(748, 6); % Test datan = 3; % In each 3rd rowm = true(748 / (n-1) * n, 1);m(n:n:end) = false;B = zeros(numel(m), 6);B(m, :) = A; Related SolutionsMATLAB: How to insert a columns of NaNs in between a matrix at multiple places [m, n] = size(matrix); Wanted = nan(m, n + numel(col_pos));Wanted(:,setdiff(1:size(Wanted,2),col_pos)) = matrix MATLAB: Selecting an entry of a row in a large matrix out = a(3:3:end,:)this worked but now I just wanna remove these rows from original matrix Related QuestionHow to insert the column [60;80] into the third columnHow is this simple code readChoose rows that the first column is larger than the second columnSwap rows and columns of a matrixCalculation within a matrixHow sort rows of matrix as per given index
Best Answer