MATLAB: How to plot two matrices together with different legs MATLAB How can I plot two matrices with the same size (1200*12) together with different legs(12+12=24)? Best Answer Just concatenate the two matrices and plot them as one,plot([Data1,results]) leg1=arrayfun(@(i) ['Data1-',num2str(i)],1:12,'uni',0); leg2=arrayfun(@(i) ['results-',num2str(i)],1:12,'uni',0);legend(leg1{:},leg2{:}); Related SolutionsMATLAB: Correlation matrix labels names = {'one', 'two', 'three'};middle = {' vs '};N = length(names);reshape(strcat({names{repmat(1:N, N, 1)}}, middle, {names{repmat(1:N, N, 1)'}}), N, N)'ans = 'one vs one' 'one vs two' 'one vs three' 'two vs one' 'two vs two' 'two vs three' 'three vs one' 'three vs two' 'three vs three' Related Question
Best Answer