Shape-preserving rational spline Hermite interpolation

버전 1.0.0 (2.02 KB) 작성자: Sunham Kim
MATLAB codes for Cai and Judd (2012)'s Shape-preserving rational spline Hermite interpolation
다운로드 수: 3
업데이트 날짜: 2023/8/19

rationalspline.m

A quick MATLAB snippet to implement shape-preserving rational spline Hermite interpolation.(Cai and Judd, Economic Letters 2012) Requires MATLAB 2015a or later. (dependency: discretize)

View Shape-preserving rational spline Hermite interpolation on File Exchange

Example

x = linspace(0.1,3,30).';   z = linspace(0.1,3,300).';
v = log(x);
s = 1./x;
[f,df,d2f] = rationalspline(x,z,v,s);

truf = log(z);
trudf = 1./z;

figure;
tt = tiledlayout(1,2);
nexttile
hold on;
plot(z,f);
plot(z,truf);
legend('Approximated Level','True Level','Location','best');
hold off;

nexttile
hold on;
plot(z,df);
plot(z,trudf);
legend('Approximated Slope','True Slope','Location','best');
hold off;
Screenshot 2023-08-19 at 7 24 01 AM

인용 양식

Sunham Kim (2024). Shape-preserving rational spline Hermite interpolation (https://github.com/sunhamkim/rationalspline/releases/tag/v1.0.0), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2023a
R2015a 이상 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

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

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.