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
 Access Fit parameter from another sheet
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mlt

2 Posts

Posted - 03/18/2011 :  06:12:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.063.988 SR6
Operating System: win XP

Hi,

Sorry for the basic question but I cannot find any solution.
I an using user-defined fitting function which is a sum of various functions to fit my data. After fitting, I want to plot the total fit, but also each of the individual functions.
How can I simply access the fitting parameters in the data sheet to generate these functions ?

Simple example to be more specific:
- my data are col(A) and col(B) in Sheet1
- After fitting I have a FitNL1 sheet with a table "parameters" containing e.g. y0, y1 values of the linear fitting
- I want to create a col(C) in Sheet1 which values would be y0 and a col(D) containing y1*col(A).

I cannot find a way to call y0 and y1 fitting parameter of sheet FitNL1 when writing the function using a "set column value" in sheet Sheet1 but I'm convinced it's possible.

Thanks by advance






Penn

China
644 Posts

Posted - 03/21/2011 :  03:34:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use the getresults X-Function to get the parameters. Take your simple example here: In the Before Formula Scripts text box of Set Column Values dialog, the following two lines are used to get the parameter y0.

getresults tr:=tr1 iw:=[book1]FitNL1!;  // book name here uses Book1
double y0 = tr1.parameters.y0.value;  // get y0

Then in the upper text box of the Set Column Values dialog, type: y0*col(a).

Penn
Go to Top of Page

mlt

2 Posts

Posted - 04/14/2011 :  1:50:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

thanks a lot ! I found another solution meanwhile, but this one is
more elegant.

Edited by - mlt on 04/14/2011 1:51:42 PM
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