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

Home » Public Forums » archive » Multiple parameters for ZEROFCN
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Multiple parameters for ZEROFCN [message #78899] Mon, 02 January 2012 14:41 Go to previous message
Rick Walton is currently offline  Rick Walton
Messages: 3
Registered: November 2011
Junior Member
I would like to find the root of a function f(x) that depends on the
values from an array. Using th IMSL function ZEROFCN appears to only
allow a single parameter to be defined, which is x. But I would like
to vary one of the constants in the function but when I try to use a
userdefined expression for this it causes an error. To demonstrate
what I`m trying to acheive see the function and code below. If anyone
has a simple solution to this I would really appreciate the help.
Thanks in advance.

FUNCTION f, x, y
RETURN, ((sinh((1.4 +x-0.25)/(0.4))/(sinh((x-0.25)/0.4)))-y
END

;array containing data for constant y
Y=fltarr(252)

;new file to input zeros
zero=fltarr(252)

;function to determine zeros in f(x)
FOR i=0, 251 DO BEGIN
zero(i)=ZEROFCN("f", y(i))
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Creating procedure with arbitrary number of input parameters
Next Topic: Where is where?

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

Current Time: Fri Oct 10 14:26:08 PDT 2025

Total time taken to generate the page: 0.79963 seconds