0001 function str = num2str_base(x, base); 0002 0003 ep = log(x)/log(base); 0004 0005 str = sprintf('%d^{%g}',base,ep);