Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
splines
There are three functions in SMath for spline interpolation: '''linterp'''('X-vector','Y-vector','x') - Returns a linearly interpolated value at x for data vectors X-vector and Y-vector of the same size. '''cinterp'''('X-vector','Y-vector','x') - Returns a cubic spline interpolated value at x for data vectors X-vector and Y-vector of the same size. '''ainterp'''('X-vector','Y-vector','x') - Returns Akima-spline interpolated value at x for data vectors X-vector and Y-vector of the same size. Here is the example of presenting these functions: [image|splines|{UP}splines/interp1.png|{UP}splines/interp1.png] Notice how misleading all of these functions are outside the limits of the original datapoints, ie below x=1 and above x=5. Try and make sure that you only use these for interpolation, not extrapolation. You can have the X-vector sorted in ascending order: [image|X-vector ascending|{UP}splines/interp2.png|{UP}splines/interp2.png] And also '''X-vector''' '''not sorted '''. As the main usage of the interpolation is to estimate y-value for the x-value not given in the table, this is '''not advisable''': [image|X-vector not sorted|{UP}splines/interp3.png|{UP}splines/interp3.png]
ScrewTurn Wiki
version 2.0.37. Some of the icons created by
FamFamFam
.