% There is probably a more elegant way,
% but look at num2eng on the MATLAB FEX at:
http://www.mathworks.com/matlabcentral/fileexchange/13168
% Unfortunately, num2eng is not vectorized.
% So, do "something" like:
xstr = get(gca,'XTickLabel'); % get current tick marks (strings)
for ii = 1:length(xstr)
xeng(ii) = num2eng(str2num(xstr(ii)); % convert to engineering strings
end
set(gca,'XTickLabel',xeng) % reset tick marks to engineering notation
% I'm sure there are still some bugs to be worked-out
% in the above code, but this is my first thought.
Thank you very much for the answe. I played around for a while, but "get(gca,'XTickLabel')" only gives you the number on the axis without the exponent; also, num2eng does not seem to be recognized by matlab:
??? Undefined function or method 'num2eng' for input arguments of type 'double'.
as it should
> also, num2eng does not seem to be recognized by matlab:
>
> ??? Undefined function or method 'num2eng' for input arguments of type 'double'.
You have to download num2eng from the above link and put it in your MATLAB path.