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 for Programming
 Forum for Origin C
 Error! Illegal syntax in constraints.

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
tony_lincoln Posted - 06/27/2013 : 11:43:36 AM
Dear Madam/sir,

I downloaded OriginPro from Originlab website with evaluation licencse, to evaluate Origin Ver. 9 in Windows 8 Operating System. I'm trying to fit one exponential curve using a function y = A0 + A * (1- exp(-Tau*x) ). In my C codes, I set parameters as following:
NLSF.Func$ = "FRAP_EXP";
NLSF.p1 = 0.5;
NLSF.p2 = 0.5375;
NLSF.p3 = 0.01;
NLSF.ChiSqrErr = 0;
I built fdf in Fitting Function Builder with the same parameter setting.
When I tried to run this C codes, it shows "Error! Illegal syntax in constraints." I checked many times, but cant find anything wrong with syntax. Can you do me a favor?

Thanks.
Tony
2   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 07/01/2013 : 2:17:58 PM
If you really are using Origin C then you should be able to use this example:
http://ocwiki.originlab.com/index.php?title=OriginC:Fit_on_one_data_with_one_explicit_function
with these modifications:

string strFDF = okutil_get_origin_path(ORIGIN_PATH_USER, "FitFunc") + "FRAP_EXP.FDF";

and

int nNumParams = 3;
vector vParams(nNumParams); // this vector should be initialized to the total number of paramaters
// This vector will be used both to set initial paramater values, and to receive the parameter values after fitting:
vParams[0] = 0.5; // y0
vParams[1] = 0.5375; // xc
vParams[2] = 0.01; // w

But it looks to me like you are actually using old LabTalk script to fit which should still work if you are doing everything else right, but we would recommend using the newer nlbegin, nlfit, nlend functions to script any fitting in Origin 9.
ZanHUNG Posted - 06/28/2013 : 03:45:30 AM
Hardly can one tell what's wrong with syntax without the C code. Constraints in Fitting Function Builder needed as well.

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