Sunday, October 14, 2012

How to use string as data for plotting in Matlab?

http://stackoverflow.com/questions/3672637/how-to-use-string-as-data-for-plotting-in-matlab
x = yourXdata;
y
= yourYdata;
labels
= {'A' 'B' 'C'};
plot
(x, y); set(gca, 'XTick', 1:3, 'XTickLabel', labels);

How to Set the Tick Locations and Labels
http://www.math.ufl.edu/help/matlab/tec2.10.html


Thread Subject: convert matrix (double) to cell array (string) without for loop
a = 1:3 ;
b = strread(num2str(a),'%s')

http://www.mathworks.com/matlabcentral/newsreader/view_thread/156758

No comments:

Post a Comment