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

Home » Public Forums » archive » FINDGEN function - Question
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
FINDGEN function - Question [message #92855] Tue, 15 March 2016 04:51 Go to next message
dmfl0590 is currently offline  dmfl0590
Messages: 17
Registered: December 2015
Junior Member
Hi

I created a floating point array using the FINDGEN function, e.g. A = FINDGEN(10).
I want to change the default starting point and make it 0.5. Also I want the maximum point to be 7.5 instead of 9 (but still be a 10 floating point array).

Can anyone help with this?

I am using an old version of IDL so I cannot use the keyword START and INCREMENT to change the defaults.


Thank you
Re: FINDGEN function - Question [message #92856 is a reply to message #92855] Tue, 15 March 2016 05:28 Go to previous messageGo to next message
Burch is currently offline  Burch
Messages: 28
Registered: December 2013
Junior Member
On Tuesday, March 15, 2016 at 6:51:27 AM UTC-5, dmfl...@gmail.com wrote:
> Hi
>
> I created a floating point array using the FINDGEN function, e.g. A = FINDGEN(10).
> I want to change the default starting point and make it 0.5. Also I want the maximum point to be 7.5 instead of 9 (but still be a 10 floating point array).
>
> Can anyone help with this?
>
> I am using an old version of IDL so I cannot use the keyword START and INCREMENT to change the defaults.
>
>
> Thank you

A = (7.0/9.0) * findgen(10) + 0.5

-Jeff
Re: FINDGEN function - Question [message #92857 is a reply to message #92855] Tue, 15 March 2016 05:30 Go to previous messageGo to next message
Burch is currently offline  Burch
Messages: 28
Registered: December 2013
Junior Member
On Tuesday, March 15, 2016 at 6:51:27 AM UTC-5, dmfl...@gmail.com wrote:
> Hi
>
> I created a floating point array using the FINDGEN function, e.g. A = FINDGEN(10).
> I want to change the default starting point and make it 0.5. Also I want the maximum point to be 7.5 instead of 9 (but still be a 10 floating point array).
>
> Can anyone help with this?
>
> I am using an old version of IDL so I cannot use the keyword START and INCREMENT to change the defaults.
>
>
> Thank you

A = (7.0/9.0) * findgen(10) + 0.5

-Jeff
Re: FINDGEN function - Question [message #92858 is a reply to message #92855] Tue, 15 March 2016 05:32 Go to previous messageGo to next message
Burch is currently offline  Burch
Messages: 28
Registered: December 2013
Junior Member
On Tuesday, March 15, 2016 at 6:51:27 AM UTC-5, dmfl...@gmail.com wrote:
> Hi
>
> I created a floating point array using the FINDGEN function, e.g. A = FINDGEN(10).
> I want to change the default starting point and make it 0.5. Also I want the maximum point to be 7.5 instead of 9 (but still be a 10 floating point array).
>
> Can anyone help with this?
>
> I am using an old version of IDL so I cannot use the keyword START and INCREMENT to change the defaults.
>
>
> Thank you

Ok, sorry for the multiple posts. I'm not so good with computers this morning apparently...

A = (7.0/9.0) * findgen(10) + 0.5

-Jeff
Re: FINDGEN function - Question [message #92859 is a reply to message #92855] Tue, 15 March 2016 07:01 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Tuesday, March 15, 2016 at 6:51:27 AM UTC-5, dmfl...@gmail.com wrote:
> Hi
>
> I created a floating point array using the FINDGEN function, e.g. A = FINDGEN(10).
> I want to change the default starting point and make it 0.5. Also I want the maximum point to be 7.5 instead of 9 (but still be a 10 floating point array).
>

INTERPOL is another way to do this:

a = INTERPOL( [0.5, 7.5], 10)

This creates 10 equally spaced points between 0.5 and 7.5.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Dealing with list created by STRSPLIT?
Next Topic: speeding up code for fitting spectra for doppler map

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

Current Time: Wed Oct 08 15:13:37 PDT 2025

Total time taken to generate the page: 0.00594 seconds