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

Home » Public Forums » archive » Re: multiple non-linear regression analysis
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: multiple non-linear regression analysis [message #24795 is a reply to message #24685] Thu, 19 April 2001 23:38 Go to previous message
Kenlo Nishida is currently offline  Kenlo Nishida
Messages: 5
Registered: April 2001
Junior Member
Thank you Bill Thompson for advice about multiple nonlinear regression.
I tried to use LMFIT by setting independent variable in structure as
you told, but the IDL refused to process LMFIT function with structure.
Error message is "% FLOAT: Struct expression not allowed in this context:
X."


The following is my test program:
------------------- start of test.pro ----------
function fn, s, a
a=float(a)
f=a[0]*s.x1+a[1]*s.x2
return, [f, s.x1, s.x2]
end

pro test

s={x1: 0.0, x2: 0.0}
x1=findgen(10)
x2=x1*x1
s=replicate(s, 10)
s.x1=x1
s.x2=x2
y=1.2*x1+2.3*x2
a=[0.1, 0.1]
fit=lmfit(s,y,a,function_name='fn')
end

------------------- end of test.pro ---------------------

Then the performance and error message is like this:

IDL> .compile test
% Compiled module: FN.
% Procedure was compiled while active: TEST. Returning.
% Compiled module: TEST.
IDL> test
% FLOAT: Struct expression not allowed in this context: X.
% Error occurred at: LMFIT 245
/usr/local/rsi/envi_3.1/idl_5.1/lib/lmfit.pro
% TEST 17 test.pro
% $MAIN$
% Execution halted at: TEST 17 test.pro
IDL>



Kenlo Nishida
kenlo@ntsg.umt.edu
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Writing geotiffs with IDL
Next Topic: multiple non-linear regression analysis

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

Current Time: Sat Oct 11 12:20:25 PDT 2025

Total time taken to generate the page: 1.68384 seconds