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
 LabTalk Forum
 Speed up NLSF
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Marco1234

Germany
7 Posts

Posted - 06/18/2002 :  03:38:36 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,
I have to fit a function like y=C1*X1+C2*X2...C24*X24 with Data1_a, Data1_b...Data1_x as depandable Var and Data2_b as independable Var!
My Athlon takes about 20 Minutes for one fit! Can I speed up this procedure? Or should I use other commands?
(I am using:
nlsf.func$
nlsf.y$
nlsf.x$
nlsf.iterate(10)
nlsf.funccol$
nlsf.makecurve(func))
I tried tp write this in Origin C but it was not faster, because I have also to use the "iterate" procedure!
More than 1000 Datasets must be fitted but with my routine that would take weeks over weeks! Can someone help me?

easwar

USA
1965 Posts

Posted - 06/18/2002 :  08:56:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you create a new function and set this function to use Origin C (by checking the compile check box in Edit page of NLSF), and then save that function and use it for fitting in your LabTalk script, it should work much faster than you report.

In any case, it looks like what you want is just multiple linear regression. Origin's built-in multiple regression tool restricts the number of independant variables to 9. However, if you have ver 7, you can use the NAG library to perform multiple regression for more than 9 independant variables. Look up the NAG function nag_regsn_mult_linear for further documentation. Using the NAG routine should work out to be much faster for you.

Easwar
OriginLab.

Edited by - easwar on 06/18/2002 08:57:45
Go to Top of Page

Marco1234

Germany
7 Posts

Posted - 06/19/2002 :  03:20:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, that helps a lot!
I will use the "Compile before use" feature!
Now it takes about 5 Seconds time!
It is a wonderful feature in Origin 7!
bye
Go to Top of Page

JoannaZajac

United Kingdom
14 Posts

Posted - 10/26/2011 :  3:48:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, is there a similar feature for orign 6?
I use fit in a loop for datasets which have 1000 columns, fit for each, it takes 5 mins to go through dataset, which is very long as I have hundreds of datasets,
appriciate comments!!


Joanna
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