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

Home » Public Forums » archive » how to create a LOG array from A to B
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how to create a LOG array from A to B [message #79004] Thu, 12 January 2012 11:27
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hello guys,

If I want to create an array of N positions from A to B I can do it
like this :
result=FINDGEN(N)*(B-A)/(N-1)+A

Right now I would like to create the same array but with a logaritmic
"distribution" and for any positive A and B.
For example, for A = 0, B = 1 and N=10 the result should be
ALOG10(1+FINDGEN(10))

This is easy if A and B are powers of 10 but I don't know how to solve
this problem with any other numbers.
Thnak you in advance for your help,

nata
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: postscripts with multiplot on a Mac
Next Topic: Creating procedure with arbitrary number of input parameters

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

Current Time: Sat Oct 11 03:43:23 PDT 2025

Total time taken to generate the page: 1.28148 seconds