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

Home » Public Forums » archive » Re: how to create a LOG array from A to B
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: how to create a LOG array from A to B [message #78988] Fri, 13 January 2012 13:32 Go to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On 1/12/2012 2:43 PM, nata wrote:
> I got it !
>
> a=1.5
> b=5.45
> N=20
>
> elev=FINDGEN(N)*(ALOG10(b)-ALOG10(a))/(N-1)+ALOG10(a)
> elev=10.^elev
>
> PLOT, elev, REPLICATE(1,N), YR=[0,2], XR=[a,b], /XLOG, /XS, /YS,
> PSYM=7
>
> nata

I know I'm late with this, but several years ago I wrote a routine for
just this purpose. Get it here:

http://www.exelisvis.com/Default.aspx?tabid=1540&id=1231

Example:

IDL> a = findgen_alog10(5.4, 56.8, 10)
IDL> print, a
5.40000 7.01365 9.10950 11.8316 15.3672
19.9593 25.9237 33.6703
43.7318 56.8000
IDL> plot, a, a, /xlog, /ylog, psym=5

mp
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: WIDGET_BASE: Unable to connect to X Windows display: :0.0
Next Topic: Re: Multiple parameters for ZEROFCN

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

Current Time: Wed Oct 08 17:41:47 PDT 2025

Total time taken to generate the page: 0.00458 seconds