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
 invalid term

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
jmb22 Posted - 07/23/2005 : 3:10:51 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System:XP

Hey,

I am trying to compile the following function in code builder to be used as a fitting function:

y = P1+2*(1+P2*1.865E-2*(1/(1.865E-2*P3)))^-1*((2.36)^2)*6.4899*1/x;
There are 3 fitting parameters: P1, P2 and P3.

When I try to compile the function, I get the following:

compiling...
_nlfspinpumpfnn.fit
C:\Program Files\OriginLab\OriginPro75\Jean-Marc Beaujour\OriginC\NLSF\_nlfspinpumpfnn.fit(40) :Error, invalid term
C:\Program Files\OriginLab\OriginPro75\Jean-Marc Beaujour\OriginC\NLSF\_nlfspinpumpfnn.fit(40) :Error, general compile error
C:\Program Files\OriginLab\OriginPro75\Jean-Marc Beaujour\OriginC\NLSF\_nlfspinpumpfnn.fit(31) :Error, error(s) found in compiling function _nlsfspinpumpfnn

i checked the parenthesis and all the terms ... it seems to be alright. I used Mathematica to fit the experimental data and that works. So what's the problem??

Thanx.
2   L A T E S T    R E P L I E S    (Newest First)
jmb22 Posted - 07/25/2005 : 09:42:14 AM
The exponent should be -1 and not (-1*2.36^2).

Thanx for your help.
Mike Buess Posted - 07/24/2005 : 07:03:07 AM
Hi,

It compiles if you bracket what appears to be the entire exponent...

y = P1+2*(1+P2*1.865E-2*(1/(1.865E-2*P3)))^(-1*((2.36)^2)*6.4899*1/x);

However, if that is correct then your equation is somewhat simpler than you have written it...

double C1 = 6.4899 * 2.36^2;
double C2 = 1.865E-2;
y = P1 + 2*(1 + P2*C2*(1/(C2*P3)))^(-1*C1*1/x);
- which reduces to -
y = P1 + 2*(1 + P2/P3)^(-C1/x);

In other words, you only need two fitting parameters.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/24/2005 07:31:42 AM

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