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
 problem fit loop...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Bigprophete

France
20 Posts

Posted - 07/24/2015 :  05:11:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I have create a loop in order to fit my data with my fit function (cf labtalk code below) but I have a problem...It is like an infinite loop since when I fit one curve it create a worksheet with the fit data...and so the compilation doesn't stop and fit again and again...

doc –e P {
nlbegin iy:=1 func:=Probability_pos; // user fit
nlpara; // this will open a dialog to monitor parameter values
// continue to run following scripts to finish the fitting
nlpara 1;

nlfit;
nlend 1;

};

lkb0221

China
497 Posts

Posted - 07/24/2015 :  09:55:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

My guess is that, you need to exclude all embedded graphs in the doc loop. Because the each fitting would generate several of it.


Zheng
OriginLab
Go to Top of Page

Bigprophete

France
20 Posts

Posted - 07/28/2015 :  07:51:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your answer.

But how to do that ? because I need to create a loop, I have more than 50 graphic which must be fitted with my function...

With best regards

Edited by - Bigprophete on 07/28/2015 07:51:57 AM
Go to Top of Page

cdrozdowski111

USA
247 Posts

Posted - 07/28/2015 :  09:19:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Try this to exclude embedded graphs from fitting

doc –e P {
	// Skip over any embedded graphs or Layout windows
	if(page.IsEmbedded==0&&exist(%H)!=11)
	{
		nlbegin iy:=1 func:=Probability_pos; // user fit
		nlpara; // this will open a dialog to monitor parameter values
		// continue to run following scripts to finish the fitting
		nlpara 1;

		nlfit;
		nlend 1;
	}
};


~Chris
Go to Top of Page

Bigprophete

France
20 Posts

Posted - 07/28/2015 :  8:00:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank Chris,
It works very well ! Now I can optimize it ^^

With best regards,


Edited by - Bigprophete on 07/28/2015 8:00:39 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