MATLAB: Create a matrix! MATLABmatricesmatrixsort Hello I have row=[1 2]; col=[10 11 13 ]; I want to have b=[10 11 13; 10 11 13] How can i do that? Best Answer repmat(col,2,1)orrepmat(col,numel(row),1) Related SolutionsMATLAB: Match elements of column array to first column of a matrix then append row of matrix to array A = [219 219 219 6401 6401 6401 6401 7501 7501];B = [206 3 4 5 219 4 5 7 5005 7 5 2 6401 2 1 8 7002 1 3 7 7501 9 4 2];[l,ii] = ismember(A,B(:,1));C = B(ii,:); MATLAB: Select from matrix! When executing the command it outputs :b = 3 2 2 1The command : b= [a(1,2:3);a(2,1:2)] selects the first line and column 2 to 3, then second line and column 1 to 2.See here for more details. Related QuestionHow to delete a zeros in matrixSubstract element of a matrix!Minimum in a matrix! and its locationShift matrix from a specific rowFor same Matrix subtraction between rowsHelp me plz, Empty matrix!
Best Answer