MATLAB: Make num2str in engineering format

eng num2str engineer

Hey, I'm writing this code:
disp(['Cutoff frequency: ',num2str(wcutoff,'%e')]);
and this displays the frequency in an normal exponential format, but I want it to be in eng format. This means that instead of:
5.2e10
I want it to show:
52.0e9
Is that possible? A possible workaround could be to use "format shortEng" and than separate the display code into 2 lines, but than I need to find a way that it'll display it in one output line or something like that…

Best Answer

Ok, I've actually came up with a better, simpler solution:
format shortEng
disp([' Cutoff frequency: ', strtrim(evalc('disp(wcutoff)'))]);
strtrim is needed because the evalc returns numerous leading and trailing white space, but this produces exactly the output I wanted, without the helper function.