How solve this error (G must be the same length as X or the same length as the number of columns in X.)in box plot?

조회 수: 14 (최근 30일)
I have this code below
function []=boxgraph_DR_total(i,Y,M1,M2,M3)
X1='Homogeneity';
X2='Energy';
X3='Entropy';
if (i==1)
boxplot([M1 M2 M3],{'Gold','Silver','Copper'}),xlabel(X1),ylabel(Y),grid;
elseif (i==2)
boxplot([M1 M2 M3],{'Gold','Silver','Copper'}),xlabel(X2),ylabel(Y),grid;
elseif (i==3)
boxplot([M1 M2 M3],{'Gold','Silver','Copper'}),xlabel(X3),ylabel(Y),grid;
end
M1, M2, M3 are a 50x19.

답변 (1개)

KSSV
KSSV 2018년 9월 27일
편집: KSSV 2018년 9월 27일
Y is a intended Y-axes label to the obtained plot. You can keep any required string.
boxgraph_DR_total(i,'I Like MATLAB',M1,M2,M3)
  댓글 수: 5
Bajdar Nour
Bajdar Nour 2018년 9월 29일
편집: Bajdar Nour 2018년 9월 30일
thanks, @KSSV, could you tell me because of what?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D Function Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by