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
 Cubic Spline Fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

CCKammerer

USA
1 Posts

Posted - 06/10/2012 :  08:41:09 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6SR3
Operating System: Windows7

Is there a way to do a cubic spline fit where I can graphically manipulate the position of the nodes or junctions? Also, I would like to see the fit statistics.


C.C.Kammerer

Kathy_Wang

China
159 Posts

Posted - 06/11/2012 :  06:09:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

In Origin, you may call a NAG function (e02bac) to do a cubic spline fit with nodes, and also get the residual sum square as the fit statistics.

For details of this NAG function, you may refer to the following PDF:

http://www.originlab.com/pdfs/nagcl07/manual/pdf/e02/e02bac.pdf

And there is a tutorial showing how to call NAG function in Origin C.

http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Calling_NAG_Functions_From_Origin_C

Also, the built-in method "Cubic B-spline"(using e02bec) for interpolation might also fulfill your needs. But this function does the fitting in a slightly different way, that the fitting is to minimize the discontinuity jump in the third order derivative rather than minimize the residual when calling the e02bac function.
You could find the details of e02bec in the following link

http://www.originlab.com/pdfs/nagcl07/manual/pdf/e02/e02bec.pdf

In addition, when you use the method below, you move control points instead of spline knots to change the fitted curve.

To use this build-in function, you could first plot your data, and select from top menu "Analysis:Mathematics:Interpolates/Extrapolates" to open the interpolation dialog, and do the setting as following figure:



Note that the smoothing factor is controlling the smoothness of your fitted curve. The bigger this factor is, the smoother your fitted curve will be, but also relevantly the bigger the residual will be.
After the fitting, you will get the result figure like this:



Each symbol is one nodes/junctions, and you may select one of the data point by clicking on it twice(but not double click), and select from top menu "Data:Move Data Points" and move the data point to somewhere else, and then click the recalculate button(or you could set recalculate mode to Auto to make it update automatically after data points change)



Hope this information helps!

Kathy

Edited by - Kathy_Wang on 06/12/2012 04:42:33 AM
Go to Top of Page

Sam Fang

293 Posts

Posted - 06/21/2012 :  03:19:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
NAG function e02bac supports to change the interior knots of B spline, i.e. spline.lamda. You can use it to graphically manipulate the position of spline knots.

Sam
OriginLab Technical Services
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