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 for Programming
 Forum for Origin C
 NLSF - setting dependent and independent
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Frank_H

Germany
Posts

Posted - 06/21/2005 :  3:39:51 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version 7.5 SR5:
Operating System: Win XP

I am currently working on some automated fit procedure with NLSF.
I would like to set the dependend variable y and the independend x freely. I tried to use the following:

// Init
using nlsf = LabTalk.NLSF;
nlsf.init();
nlsf.Func$ = "gauss";
nlsf.cleanUpFitData();
// Set data
nlsf.setIndep("x",dsx_name); // set x dataset
nlsf.setDepend("y",dsy_name); // set y dataset
etc.

which did not work. Using instead for the data assignment:

// Set data
nlsf.fitData1$ = dsy_name;

with proper column settings worked fine. But I would like to be able to use x-data either without setting the column type as x or even without being in the same worksheet as the y-data.
Is it just the wrong syntax for nlsf.setIndep/setDepend ?
The help file is not completely clear to me.

Thanks and Regards
Frank

Mike Buess

USA
3037 Posts

Posted - 06/21/2005 :  4:01:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Frank,

I think there are quirks with nlsf.setIndep() and nlsf.setDepend(). Try this instead...

nlsf.x$ = dsx_name; // X dataset
nlsf.fitdata1$ = dsy_name; // Y dataset
- or -
nlsf.y1$ = dsy_name;

...I don't think that dsx_name needs to be an X column. It certainly does not need to be in the same wks as dsy_name.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/21/2005 4:12: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