comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Force to print exponential to e-6
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Force to print exponential to e-6 [message #88046 is a reply to message #88045] Fri, 14 March 2014 06:30 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Doppler writes:

> I have, say an array with three numbers:
> [2e-5,2e-6,2e-7]
>
> I would like to print them on screen like this
> 20.0e-6, 2.0e-6, 0.2e-6
>
> so forcing the exponential to be -6.
>
> I can't figure it out how to do it. I'm trying to use string(format='(e)', x) without success.

I think you will probably have to write some kind of tick formatting
function:

http://www.idlcoyote.com/tips/exponents.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Optimizing code for faster calculation
Next Topic: Need help with map projection conversion in IDL or ENVI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:48:50 PDT 2025

Total time taken to generate the page: 0.00411 seconds