MATLAB: How to creat two box plot in one graph use different data boxplotboxplot graphics statisticsmultiple vectors a=[9 3 5 3 0 10 6 8 4 9 7 3 8 6 6 9 1 8 8 6 10] b=[10 7 5 6 8 6 4 7 8 8 9 7 10 7 6 6 7 2 8 10 8] this is the two group number. Best Answer One way is to use a "grouping variable" as the second argument:a=[9 3 5 3 0 10 6 8 4 9 7 3 8 6 6 9 1 8 8 6 10];b=[10 7 5 6 8 6 4 7 8 8 9 7 10 7 6 6 7 2 8 10 8];ag = ones(size(a));bg = 2*ones(size(b));figureboxplot([a b]',[ag bg]')set(gca,'XTickLabel',{'a','b'}) Related SolutionsMATLAB: Help running Matlab scriptMATLAB: Counting n subsequent element of an array b = conv(a,[1 1 1],'valid') Related QuestionIs it possible to extract the values with a vector of indices for each row without using the for statement from the matrixHow to get combination of elements in a matrix in pair orderHow to modify a matrix to change the entries >=0 and multiply it by 5 AND to change the entries <0 and add 2 to those entriesWhhat is the best way to remove repitions of two or three vectors
Best Answer