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

Home » Public Forums » archive » static variables
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
static variables [message #8894] Wed, 30 April 1997 00:00
Jonathan Rogness is currently offline  Jonathan Rogness
Messages: 7
Registered: April 1997
Junior Member
Hello,

I've been playing around with the POWELL minimization routine in IDL
(version 4.0). In a nutshell, I've got a model with four parameters,
and I need to solve those parameters so that the error of the model
compared to real world measurements is minimized.

This leads to a problem: my object function simply computes the error
for a given bunch of parameters, but to do this the function needs to
have access to 30+ measurements from a file. I'd rather not read in the
file every time the function is called.

I started out writing in C and using the NAG minimization routines, but
since the calling routines were in IDL I thought it would be nice to
stay in one language. In C the problem was solved by using static
variables; I could use a function to read in the measurements, and every
time it was called subsequently it would remember the previous values.
I haven't run across anything like that in IDL.

Any tips/suggestions/thoughts on how to do this would be greatly
appreciated. Sorry if it's a little vague - I don't want to bore
anybody with the details unless it's absolutely necessary. ;-)

Jonathan Rogness
rogness@sg1.cr.usgs.gov
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Error in concatenating structure arrays
Next Topic: STATIC VARIABLES

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

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

Total time taken to generate the page: 0.00550 seconds