MATLAB: Adding elements to a 2D array arraysmatrix Suppose matrix A=[ 1,2 ; 3,4 ; 5,6] Matrix B=[ 7 , 8 ] whever I use C=[A,B] I receive this error message Error using ==> horzcat CAT arguments dimensions are not consistent. Best Answer C = [A; B] Related SolutionsMATLAB: Matrix reshaping reshape(A',1,[]) MATLAB: Dimension mismatch error in matrix. C(:, 2:2:2*size(B,2))=B; C(:, 1:2:end)=A; Related QuestionDo a matrix,arrayRearranging elements in a 2D arrayElement wise multiplication array-matrix between each element of the array with the whole matrixCompare elements of cell and 2D array
Best Answer