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
 Origin ignores 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
ErdemG Posted - 07/10/2018 : 10:43:16 AM
No matter what constraints i put in my nonlinear fit (like y(5)=0.2) Origin doesn't change the fit or just tells me that it couldn't be fit. I can't possibly make it work. It's like the constraint option is just a commentar box that has no impact on anything. Anyone an idea how I can fix it?
7   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 07/11/2018 : 11:58:09 AM
Hi ErdemG,

I'm a bit confused, but if A=yMAX*x , then A is not a parameter, but a part of the function.
So, you should be able to construct the function (e.g., as an Origin C code) accordingly, I guess.

I misunderstood something?

--Hideo Fujii
OriginLab
ErdemG Posted - 07/10/2018 : 4:06:26 PM
Hi Hideo Fujii,

Unfortunitely the experimental data points I have deviate from the expected curve quite a bit so I can't use that. Is there another way to use a constraint involving the maximum of the fitting curve?
Hideo Fujii Posted - 07/10/2018 : 2:13:39 PM
Hi ErdemG,

Could you please try the following constraint?
A=max(%C)
Here, %C is the given Y dataset to be applied the Max function. In a simple trial, it seems
working (in my Origin 2018b).

--Hideo Fujii
OriginLab

P.S. Oh, sorry, this is the max of the dataset, not of the curve, though it might be acceptable
if your data points are fulfilling most of the peak area of the curve.
ErdemG Posted - 07/10/2018 : 1:05:42 PM
Hi Hideo Fujii,

I see. Thanks, that explains why it isn't working atleast. I guess weighting points is the only possible solution then.
Another question I have is, if it's possible to use constraints like A=maximal value of the curve?
becuase another condition I'd have to build in is A=yMAX*x at yMAX
Hideo Fujii Posted - 07/10/2018 : 12:34:55 PM
Hi ErdemG,

The constraints in the NLFit tool must be linear, but your constraint formula,
2*(5-x0)*A/(B+A^2+(5-x0)^2)=0.4
is't linear. See the details at:
https://www.originlab.com/doc/Origin-Help/FitPara-General-Linear-Constraint

Best,

--Hideo Fujii
OriginLab

P.S. Seems that as your "constraint" is of equity, you may be able to reduce the number of parameters,
say you can replace B in terms of x0 and A.
ErdemG Posted - 07/10/2018 : 11:44:01 AM
Hi,

First off, thanks for the quick reply.
I used the constraint in Nonlinear Curve Fitter, yes. It worked once for a random value I tried but afterwards, it didn't anymore


What I tried to do is making the curve higher so the points outside of the current curve are closer to it.
https://media.discordapp.net/attachments/270265213746544640/466265521797464064/unknown.png
So is the constraint option useless for this or what would I have to do to fit my curve the way I want? I'm not very experienced with Origin yet, so I'm not sure how the weighting works

UPDATE: https://media.discordapp.net/attachments/270265213746544640/466273850028589056/unknown.png?width=697&height=474
It keeps telling me to check my parameter names and the syntax. Is there something wrong with the way I used the code?
Hideo Fujii Posted - 07/10/2018 : 11:13:46 AM
Hi ErdemG,

In my understanding, the constraint in Nonlinear Curve Fitter is of the parameters - this is
the general way of handling of constraints not only in Origin.

If you meant Y=0.2 at X=5, you have to formulate a new revised function form which pass
(5, 0.2), if possible. Another "practical" workaround may be to add a data point at (5, 0.2),
and fit with weighting scheme where (5, 0.2) has an extremely higher weight than other points.

Hope I didn't misunderstand what you meant.

--Hideo Fujii
OriginLab

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