From: Walter Roberson on 14 Jun 2010 18:22 Doug Schwarz wrote: > dpb wrote: >> Cindy wrote: >>> Could anyone please tell me how to print 0.00123 in a file as 1.23-03 >>> in Matlab? It seems %3.2e gives me 1.23-003. >> >> No way to suppress the 3-digit exponent other the postprocess a string... > > Not true. Only Windows uses 3 digits so an excellent solution would be > to change your platform. ;-) However, none of the platforms will eliminate the 'e' or 'E' as required by the original request, so unless there was a typo in the original request, post-processing would still have to be done.
From: Cindy on 14 Jun 2010 18:37 Walter Roberson <roberson(a)hushmail.com> wrote in message <hv6a6f$nok$2(a)canopus.cc.umanitoba.ca>... > Doug Schwarz wrote: > > dpb wrote: > >> Cindy wrote: > > >>> Could anyone please tell me how to print 0.00123 in a file as 1.23-03 > >>> in Matlab? It seems %3.2e gives me 1.23-003. > >> > >> No way to suppress the 3-digit exponent other the postprocess a string... > > > > Not true. Only Windows uses 3 digits so an excellent solution would be > > to change your platform. ;-) > > However, none of the platforms will eliminate the 'e' or 'E' as required by > the original request, so unless there was a typo in the original request, > post-processing would still have to be done. Yes, it was a typo. I meant 1.23e-03. Sorry.
From: us on 14 Jun 2010 19:33
"Cindy" <xzhan2(a)fhcrc.org> wrote in message <hv6aug$775$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <hv6a6f$nok$2(a)canopus.cc.umanitoba.ca>... > > Doug Schwarz wrote: > > > dpb wrote: > > >> Cindy wrote: > > > > >>> Could anyone please tell me how to print 0.00123 in a file as 1.23-03 > > >>> in Matlab? It seems %3.2e gives me 1.23-003. > > >> > > >> No way to suppress the 3-digit exponent other the postprocess a string... > > > > > > Not true. Only Windows uses 3 digits so an excellent solution would be > > > to change your platform. ;-) > > > > However, none of the platforms will eliminate the 'e' or 'E' as required by > > the original request, so unless there was a typo in the original request, > > post-processing would still have to be done. > > Yes, it was a typo. I meant 1.23e-03. Sorry. of course... now, did you look at what i showed you(?)... % s = 1.23e-03 us |