The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Question on partial derivatives in NLSF

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
skyocean Posted - 04/15/2002 : 11:10:30 PM
Hi,

For non-linear least squares fitting with a user supplied fitting function, I want to supply the partial derivatives of the parameters. For example, I define the following script(actually it comes from the origin help):
y=m*x+b;
y'm=x;
y'b=1;
check "Compile before use", then press "Check" button, origin will complain the following message in script window:
Error, Invalid statement
Error, error(s) found in compiling function _nlsfFittingFunction
Otherwise, if i don't check "Compile before use", it works, the fitting speed, however, is extremely slow. Does anyone has this kind of experience, thanks.
2   L A T E S T    R E P L I E S    (Newest First)
skyocean Posted - 04/17/2002 : 09:30:24 AM
Hi, Easwar,

Thank you so much for your reply. However, I suggest the origin help should explain this, it only says partial derivatives will give a gain in speed, so make me fuzzy about what I have tried. Thanks again, Easwar.
easwar Posted - 04/16/2002 : 12:17:59 PM
Hello,

Support for specifying partial derivatives was added at the LabTalk level in 6.x. This is not yet supported in Origin C in 7.0.

When you check the Compile check box, your code in the edit window is expected to be in C syntax, and this is why you get the error from the compiler.

Now, partial derivative support was added earlier to speed things up with LabTalk scripts in fitting - specifying partial derivatives only gave a gain in speed of about 30% or so.

Now, with Origin C, the gain in speed can be a factor of 20 or so over LabTalk, when fitting. So the best option for you would be to NOT put in partial derivatives in your code, and then CHECK the Compile check box.

Easwar
OriginLab.

Edited by - easwar on 04/16/2002 12:19:53

Edited by - easwar on 04/16/2002 12:20:57

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000