MATLAB: alternative to CSAPE function?

  • Context: MATLAB 
  • Thread starter Thread starter PhysMaster
  • Start date Start date
  • Tags Tags
    Function Matlab
Click For Summary
SUMMARY

The discussion centers on finding alternatives to the CSAPE function in MATLAB for spline fitting, particularly for aerospace applications involving airfoils with specific end conditions. Users highlight the limitations of not having access to the Spline Toolbox and suggest that while there are user-created functions available, they may not meet the necessary requirements for end conditions. The Curve Fitting Toolbox is recommended as the current source for spline fitting functions in MATLAB. Additionally, participants suggest creating custom spline routines using MATLAB's built-in solvers and normalized variables for improved numerical stability.

PREREQUISITES
  • Understanding of spline fitting techniques
  • Familiarity with MATLAB programming
  • Knowledge of linear systems and solvers in MATLAB
  • Basic concepts of numerical stability in mathematical computations
NEXT STEPS
  • Research "MATLAB Curve Fitting Toolbox" for spline fitting capabilities
  • Learn about "clamped cubic splines" and their implementation
  • Explore creating custom spline routines in MATLAB using built-in solvers
  • Investigate numerical stability techniques in spline fitting
USEFUL FOR

Aerospace engineers, MATLAB users needing spline fitting solutions, and developers looking to implement custom mathematical routines for specific applications.

PhysMaster
Messages
32
Reaction score
0
MATLAB: alternative to CSAPE function? (Aerospace application)

Hi,
I need it to spline fit an airfoil. This function is special because it has "end conditions". So the trailing edge will remain intact. I am looking for an alternative because I don't have Spline Toolbox and this is the only function I need.

MathWorks Original Function Link: http://www.mathworks.com/access/helpdesk/help/toolbox/splines/index.html?/access/helpdesk/help/toolbox/splines/csape.html&http://www.mathworks.com/cgi-bin/texis/webinator/search/?db=MSS&prox=page&rorder=750&rprox=750&rdfreq=500&rwfreq=500&rlead=250&sufs=0&order=r&is_summary_on=1&ResultCount=10&query=csape&submitButtonName=Search"

I found this: http://www.mathworks.com/matlabcentral/fileexchange/17610 but it doesn't say anything about end conditions.

Please let me know of any other (maybe user created) function that can do this. Just a tool, it can be for excel anything else.

Thank you.
 
Last edited by a moderator:
Physics news on Phys.org
I believe no one would waste time creating another function that has been already created. I don't know about other softwares, but surely excel doesn't have something like that.

To the reader: if you have come looking for an alternative, like the OP, I'll advise you to buy the Toolbox. Matlab doesn't publish it's source code for functions, so there is almost no way you can find an exact duplicate function.

Currently, the spline fitting functions are in the Curve Fitting Toolbox:
https://in.mathworks.com/help/curvefit/spline-fitting.html
 
PhysMaster said:
MATLAB: alternative to CSAPE function? (Aerospace application)

Hi,
I need it to spline fit an airfoil. This function is special because it has "end conditions". So the trailing edge will remain intact. I am looking for an alternative because I don't have Spline Toolbox and this is the only function I need.

What sort of end conditions? Specifying the first derivatives at the endpoints is a fairly standard constraint, I think called "clamped cubic splines".

it shouldn't be that hard to homebrew your own spline routine, as ultimately it comes down to a linear system. Read a little literature on how to set up the equations, define your linear system, and use Matlab's built-in solver. (HELP SLASH).

Implementation note: In writing my own spline routines, I've always found it convenient to work in normalized variables that go from 0 to 1 on each segment (that makes the equations incredibly simple), or relative coordinates that go from 0 to delta-x on each segment (almost as simple). This also tends to keep the coefficients small and the expressions numerically stable.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
9K