Problem in setting xtick labels

조회 수: 6 (최근 30일)
Fred
Fred 2014년 3월 15일
댓글: Fred 2014년 3월 15일
I have a plot like this:
E = plot(100.*x2(433:444,1),'*-r','MarkerSize', 5);
set(gca,'xtick',1:1:12);
set(gca,'xticklabel',['10/12';'11/12';'12/12','1/13';'2/13';'3/13';'4/13';'5/13';'6/13';'7/13';'8/13','9/13'])
legend([E],'0.25 Percentile (11 mg/l)');
but I get this error:
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
How can I fix it? Thanks

채택된 답변

per isakson
per isakson 2014년 3월 15일
편집: per isakson 2014년 3월 15일
Try change
'1/13'
to
' 1/13'
to make the length of all strings the same.
  댓글 수: 4
per isakson
per isakson 2014년 3월 15일
편집: per isakson 2014년 3월 15일
There is a "," that causes the error
' 8/13',' 9/13'
change to
' 8/13';' 9/13'
and there is one more "," that need to be replaced by ";"
Fred
Fred 2014년 3월 15일
Thanks got it

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by