MATLAB: Matrix Dimensions Solution Needed MATLABmatrixsize function - how to use it??? Dear Friends how to find the dimension of matrix in matlab Best Answer Read about the function size. If A is your matrix, size give you the dimensions. [m,n] = size(A) ; % m -rows, n - columns [m,n,p] = size(A) ; %m- rows, n - columns, p - third diemsnion. Related SolutionsMATLAB: Multiply col vector with matrix You can do it like this.bsxfun(@times,M,N)If N is column vector then each colmn in M is multiplied by N, else if N is row vector then each row in M is multiplied by N. MATLAB: Index exceeds matrix dimensions. [m,n,p] = size(re) ; for j=1:m %Display the 3color channel for k=1:n mR=re(j,k,1); mG=re(j,k,2); mB=re(j,k,3); d=[mR mG mB]; disp('d value is'); disp(d); end end Related QuestionHow to reshape each column of a matrix“Index exceeds matrix dimensions” Error. solution please.Creating a matrix by expanding a rowIndex exceeds matrix dimensionsGoing from 1 x n to n x n matrixNumerical solution
Best Answer