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
 NLFit: Showing extra info in "Messages"

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
cybernike Posted - 08/14/2012 : 12:25:47 AM
I have two questions

1)Is there a way to show extra information in "Messages" tab in the NLFit dialog box? I'd like to output the derived parameters at each simplex iteration that I do.

2) Is there a way to output a number that is a function of a derived parameter(s), i.e., a derived parameter based on a derived parameter(s)?

Thanks.
7   L A T E S T    R E P L I E S    (Newest First)
cybernike Posted - 08/16/2012 : 01:53:00 AM
I think I found it:
It is something like:
nlbeginr (1,2,3,4) func:=fctname nltree:=tr;

Thanks..

I will now have to look for how to do the following:
1) Do only one iteration of the fitting procedure
2) Calculate the functional values, with the current parameters at this step, at the data points.

cybernike Posted - 08/15/2012 : 11:30:36 PM
I'm almost there...so this might be the last question..

I use "nlbegin" to start with XY data.

I use "nlbeginz" to start with XYZ data.

but how to start with an XYZW data set? I have three X, Y, Z independent variables and one dependent variable W.

Thanks!
Echo_Chu Posted - 08/15/2012 : 10:22:53 PM
If there is more than one constraint, you can define them in a line. It is the same as the Constraint in our NLFit dialog. Such as the code below


nlbegin iy:=(1,2) func:=gauss nltree:=nlt;
nlt.constraints = 1;
nlt.constr$ = "A<900 ; w<10 ";
nlfit;
nlend 1 1;


General linear constraint such as "xc<y0" is allowed. Nonlinear constraints such as "w^2>A" are not allowed. You can also learn the details from the hints in our NLfit dialog
cybernike Posted - 08/15/2012 : 09:40:32 AM
Echo, that helps!

I don't think there are any examples for imposing constraints on the wiki, right? (I couldn't search the keyword "constr$".)

How would one impose more than one constraint?

If I do
nlt.constr$ = "A<900"; nlt.constr$ = "B<80";
will both constraints be imposed? or the second one will override the first one?

Would a "generalized" linear constraint work? For instance, "A<B";

Thanks!
Echo_Chu Posted - 08/15/2012 : 05:30:59 AM
You can use labtalk script as below to enable the constrains during fit


nlbegin iy:=(1,2) func:=gauss nltree:=nlt;
nlt.constraints = 1;
nlt.constr$ = "A<900";
nlfit;
nlend 1 1;


For more info to run Non-linear fitting in LabTalk, you can find the general introduction in this page. And there are more examples in the nlbegin page
Echo_Chu Posted - 08/15/2012 : 04:57:53 AM
Hi, Steve,

I am afraid that we can not update the nlfit dialog to show derived parameter there.

However, we can get it via Labtalk, please look at the sample code as below


nlbegin iy:=(1,2) func:=gauss nltree:=nlt; //Fit data stored in the first two column of active worksheet with function Gauss
for (ii=1; ii<=400; ii++)
{
	nlfit 1;
	nlt.FWHM =; //FWHM is the derived parameter in the Gauss function
	if (nlt.fitstatus==100) //Exit if fit is converged
		break;
}
nlend;


cybernike Posted - 08/15/2012 : 12:50:25 AM
The answers to my questions may be limited by the limitations in the NLFit dialog box..but do you think what I am trying to ask is possible through Labtalk scripting?

Another question about Labtalk: I have tried to look through the Labtalk documentation, but I couldn't find how one uses it to impose constraints in a fit.

Any pointer is much appreciated.

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