MATLAB Answers

Problem in setting xtick labels

12 views (last 30 days)
Fred
Fred on 15 Mar 2014
Commented: Fred on 15 Mar 2014
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

  0 Comments

Sign in to comment.

Accepted Answer

per isakson
per isakson on 15 Mar 2014
Edited: per isakson on 15 Mar 2014
Try change
'1/13'
to
' 1/13'
to make the length of all strings the same.

  4 Comments

Show 1 older comment
per isakson
per isakson on 15 Mar 2014
Did you get a different error?
per isakson
per isakson on 15 Mar 2014
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 on 15 Mar 2014
Thanks got it

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

Products


Translated by