MATLAB: Combine 2 matrices into 1 MATLAB I have a matrix a= 1 1 1 1 1 1 1 1 1b= 2 2 2 2 2 2 2 2 2 How do I combine them into 1 2 1 2 1 21 2 1 2 1 21 2 1 2 1 2 Best Answer You can use command which is given in the below link. https://in.mathworks.com/matlabcentral/answers/266969-combine-two-matrices-every-other-column Related SolutionsMATLAB: Compare 2 vectors and classify them C = 1 * (A==1 & B==1) + 2 * (A==1 & B==2) +... 3 * (A==2 & B==1) + 4 * (A==2 & B==2) MATLAB: How to plot a filled box Plot each of the sides separatelyh = fill3([1 1 2 2],[1 2 2 1],[1 1 1 1],'r', ... [1 1 2 2],[1 2 2 1],[2 2 2 2],'r', ... [1 1 1 1],[1 2 2 1],[1 1 2 2],'b', ... [2 2 2 2],[1 2 2 1],[1 1 2 2],'b', ... [1 1 2 2],[1 1 1 1],[1 2 2 1],'g-',... [1 1 2 2],[2 2 2 2],[1 2 2 1],'g-') ;set(h,'FaceAlpha',0.3) ; Related QuestionCombining matricesSteps between to elements of a matrixCombining MatricesProblem when trying to solve a rotation matrix with symbolic elements: (Master thesis)How to combine matrices
Best Answer