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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Retrieve temporary dataset
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

altomare

USA
19 Posts

Posted - 08/16/2005 :  6:57:39 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: WinXP

I am trying to fit some dataset using a custom function with a script like
r=exp(-x*a1);
y=f(r);

The output of this fitting function is the y value but I was wondering if it is possible to have origin (using some property of the nlsf object) to create a dataset for the intermediate value r without calculating it afterward (there is a certain number of parameter I have omitted here which would be a pain to get it right).
Is there any way to do it?
Thanks a lot
Fabio

PS I tried to define r as a dependent variable as well but the fit is not working in this case

Leo_Li

China
Posts

Posted - 08/17/2005 :  06:25:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Fabio,

After performing the NLSF fit, you can add a new column to your source worksheet. Assume the title of your worksheet is "Data1", in which Col(A) contains X values, and Col(D) is the new column; run the following script in the Script Window:

Data1_D = exp(-Data1_A * nlsf.p1)

Here I assume that a1 is the 1st parameter, so nslf.p1 = a1.

Leo
OriginLab Corp.
Go to Top of Page

altomare

USA
19 Posts

Posted - 08/17/2005 :  1:14:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Leo,
unfortunately there are several additional assignment in the script involving vector operation on the x variable (of the fit as well): this is the reason I was hoping there was some way to do it in a similar fashion to nlsf.funcx$ .
I have, in fact, tried to define my variable (r) as additional independent variable in the fit and tried nlsf.funcx1$ and nlsf.funcx2$ (in analogy to nlsf.x1$ and nlsf.x2$) but it didn't work.
Do you have any other suggestion I can try?
Thanks a lot

Fabio
Go to Top of Page

Leo_Li

China
Posts

Posted - 08/18/2005 :  04:15:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Fabio,

You may want to try "After Fit Script" to automate the vector operations on X variable. To do it, pick "Script -> After Fit" menu in Nonlinear Curve Fitting dialog.

Leo
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000