[ndata, text, alldata] = xlsread(\'Euro swap rates.xlsx\',3);
%(although created from text dates is still a cell array?)
dates=text(:,1);
%(Same problem here)
rates_h
It looks like you want to set the labels on the x-axis.
You don't do this through surf
, you do it after using set
, like this:
set(axHandle, 'XTickLabel', xlabels);
Here is a complete example:
[x y] = meshgrid(-4:.25:4;);
z = x.^2 + y.^2;
xlab = {'one','two','three','four'};
surf(x,y,z);
set(gca,'XTickLabel', xlab);
You can use whatever labels you want provided that they are strings and saved to a cell array. This is what I did above for xlab
.