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
 Getting NLSF parameters into a worksheet
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

wolfe1

USA
2 Posts

Posted - 03/04/2005 :  11:11:17 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:XP Pro

I am currently using the NLSF module to do some data analysis and would like to be able to have the fit parameters witten to a worksheet. I tried using the multifit addon with the mf2wks command, but I need to do one fit at a time, and it opens a new worsheet for each set of parameters. What I would like is to be able to have the results written into the same worksheet as the fit before them. Is there an easy way to do this that I have overlooked? Can you give me some advice on how this could be done? Thank you in advance.

Mike Buess

USA
3037 Posts

Posted - 03/05/2005 :  07:58:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use the NLSF module's After Fitting scripts to write the parameters where ever you like. If your output wks looks like that created by MultiFit then your script can look like this...

%W=Results; // Use name of your output wks here
if(exist(%W,2)==0) return; // If not exist quit
get %(%W,1) -e npt; // how many output rows?
set %W -er npt+1; // add new row
%(%W,1,npt+1)$=nlsf.fitdata1$; // dataset name
loop (i,1,nlsf.npara) {
ii=2*i;
%(%W,ii,npt+1)=nlsf.p$(i); // parameter value
%(%W,ii+1,npt+1)=nlsf.e$(i); // error
};

...The MultiFit add-on has been updated to handle parameters from a single curve fitting session in the manner you requested. Use the command "mf2wks Results" to append the current parameters to the wks named Results. (You can use any name you want.) The worksheet will be created if it doesn't exist and will be identical to the wks created by the mfseq command. You can either use the mf2wks command in the After Fitting scripts as discussed above or else execute from the script window.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/05/2005 08:01:52 AM

Edited by - Mike Buess on 03/05/2005 08:32:30 AM

Edited by - Mike Buess on 03/05/2005 11:09:48 AM
Go to Top of Page

wolfe1

USA
2 Posts

Posted - 03/08/2005 :  10:48:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much! That was exactly what I neeeded.
TLH
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