Approximation of 2-D Data by Natural Cubic Spline

버전 1.1.0.0 (10.3 KB) 작성자: Dr. Murtaza Ali Khan
Approximation (Data Fitting) by Natural Cubic Spline.
다운로드 수: 6.4K
업데이트 날짜: 2009/7/9

라이선스 보기

ncs2dapprox.m
-------------
Function for cubic spline approximation of 2D data.

Syntax of Usage:
[arg1out,arg2out,arg3out,arg4out]=ncs2dapprox(arg1in,arg2in,arg3in,arg4in)

arg1in: Input x-Data e.g. [x1, x2, x3,...,xn]
arg2in: Input y-Data e.g. [y1, y2, y3,...,yn]
arg3in: Maximum allowed Square Distance between Data and parametric values (Optional argument)
arg4in: Indices of Data where Spline MUST interpolate (Optional argument)

arg1out: x-values of output break points
arg2out: y-values of output break points
arg3out: Indices of output break points
arg4out: max squared distance b/w input and output values

Testncs2dapprox.m
-----------------
A Test program that shows how to use ncs2dapprox.m

Details
Suppose we have set of continuous points (xi,yi), 1<=i<=n (e.g. boundary or some signal) and we want to approximate them using Natural Cubic Spline.

A general concept of fitting Algorithm is following:

1. Fit the spline to Data using initial break points.
2. Find the Max. square distance b/w spline approximated data and original data.
3. while(Max. Square Distance > Max Allowed Square Distance)
4. Add point of max. distance to set of break points.
5. Fit the spline using new set of break points.
6. Find the Max. square distance b/w spline approximated data and original data.
7. Go to step 3.
8. end while
------------------------------

인용 양식

Dr. Murtaza Ali Khan (2025). Approximation of 2-D Data by Natural Cubic Spline (https://kr.mathworks.com/matlabcentral/fileexchange/7617-approximation-of-2-d-data-by-natural-cubic-spline), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Splines에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

BSD License

1.0.0.0

more compact coding