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

Home » Public Forums » archive » CURVEFIT, FUNCT
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
CURVEFIT, FUNCT [message #297] Mon, 24 February 1992 13:07
dungan is currently offline  dungan
Messages: 2
Registered: February 1992
Junior Member
I need help from a generous soul who has
experience with the IDL function CURVEFIT.
Is this considered a trusty and well-written
routine? I am trying to get it to fit a
simple exponential decay function to 307 data,
and am having some trouble. I have created
a procedure called EXPDECAY, which I modified
from FUNCT. It takes 2 parameters, and is of
the form:
y = Ao * exp(-x/A1)

IDL doesn't seem to be recognizing it. My
session looks like this:

Common Blocks:
DEVIO(1)
Saved Procedures:
EXPDECAY FUNCT READNUM READSTRING
SCATTER
Saved Functions:
CURVEFIT

IDL> print,n_elements(x1)
307
IDL> print,n_elements(y1)
307
IDL> print,n_elements(a)
2
IDL> w=replicate(1.,307)
IDL> yfit=curvefit(x1,y1,w,a,Function_Name=expdecay)
% Attempt to subscript A with <INT ( 2)> is out of range.
% Execution halted at FUNCT </u/local/idl.new/lib/userlib/funct.pro( 39)> .
% Called from CURVEFIT </u/local/idl.new/lib/userlib/curvefit.pro( 93)>.
% Called from $MAIN$.
IDL>

I must be specifying the keyword improperly, as IDL is looking for FUNCT.
Any suggestions on this specific question or on the more general question
of curvefitting with IDL would be appreciated.

Sincerely,

Jennifer Dungan
TGS Technology
NASA Ames Research Center
jennifer@vessna.arc.nasa.gov
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: number of available windows
Next Topic: Selecting fonts in WIDGET_TEXT

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

Current Time: Wed Oct 08 11:41:44 PDT 2025

Total time taken to generate the page: 0.00670 seconds