MATLAB: How to fill a matrix with ones MATLAB I have two matrix A=109*26 and B=1600*26. I want to fill A with ones to reach 1600*26. Best Answer A =[A; ones(1600-109,26)]; % size(A) Related SolutionsMATLAB: Change of whole row in matrix YourMatrix( any(YourMatrix<0, 2), :) = 0; MATLAB: Fill matrix with zeros A: is the Fixed Sized MatrixB: is the Variable Sized MatrixA(:,1) .* [B(1:min(size(A,1),size(B,1)),1); zeros(size(A,1)-size(B,1),1)] Related QuestionHow to get the correct value from the given matrixRemove a subset matrix from another matrixFill a matrix, with other matrix
Best Answer