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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Curve_derivative in NLSF

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
thamizh Posted - 01/13/2015 : 06:57:04 AM
Origin Ver. and Service Release (Select Help-->About Origin): Origin Pro 9.0.0 (32 bit) SR2 b87
Operating System: Windows XP

How to use the origin C command "Curve_derivative" in the NLSF function? My fitting parameters will generate two Datasets, I need to differentiate the two Datasets with respect to independent variable "x" and then use these differentiated datasets further in my program.

I have the Code in Origin C. But I have to change the fitting parameters manually, which is a very cumbersome process..?

I got stuck about how to use the "Curve_derivative" in NLSF..!

Let me thank you in advance for your help in this regard.

-Thamizhavel
1   L A T E S T    R E P L I E S    (Newest First)
Echo_Chu Posted - 01/14/2015 : 04:48:41 AM
Hi, Thamizhavel

You can look at the document of curve_derivative in this page
http://www.originlab.com/doc/OriginC/ref/Curve-Derivative-GlobalFunction

However, I assume your question is how to output the result of curve_derivative in a worksheet during the fitting. If yes, here is an example to create worksheet and then output an internal result to the worksheet


void _nlsfMyGaussian(
// Fit Parameter(s):
double y0, double xc, double A, double w,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
	// Beginning of editable part
	y = y0 + A/(w*sqrt(PI/(4*ln(2)))) * exp(-4*ln(2)*(x-xc)^2/w^2);
	double lnxc = ln(xc);
	//Generate a worksheet and output the internal result,lnxc, to the worksheet
	Worksheet wks("[Book1]Sheet1");
	if (!wks)
	{
		wks.Create("Origin.otw");
	}
	 wks.SetCell(0, 0, "lnxc");
	wks.SetCell(0,1,lnxc);
	
	// End of editable part
}


Echo
OriginLab Corp.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000