MATLAB: Adding two different size matrices adding two different size matrices Hi all I have a one matrice whos size is 100×50 let say A=ones(100,50) and I want to add it with its transpose B=A+A'; but I am getting error of matrix dimensions. Any help is appreciated………. Best Answer You can't add matrices of different dimensions.The transpose of A has dimension (50x100)Think of it:A =[1 2 3 4 5 6];B = [1 3 5 2 4 6];What would you want A+B to be? Related SolutionsMATLAB: Access different elements of matrix B = A( :, :, :, [2:5, 7] ); MATLAB: Adding zeros to a matrix to match the dimensions of two matrices. newA = [A, zeros(size(A, 1), size(B, 2)-size(A, 2)); zeros(size(B, 1)-size(A, 1), size(B, 2))];Assuming that both dimensions of B are greater than A. Related QuestionAvoid for loop on sum on given indexes, use accumarray3 dimentions matrix CreationAdding 3rd dimensional arrayHow to solve matrices problemHow to access a submatrix as an array inline
Best Answer