単調性維持スプライン補間の縦座標を返します。
カテゴリ: | 数学 |
data msplint; do x=0 to 100 by .1; msplint=msplint(x, 9, 10, 20, 25, 50, 55, 70, 70, 80, 90, 20, 30, 30, 40, 70, 60, 50, 40, 40); output; end; run; data knots; input x y; datalines; 10 20 20 30 25 30 50 40 55 70 70 60 70 50 80 40 90 40 ; data plot; merge knots msplint; by x; run; title "Comparison of Splines"; title2 "Non-monotonicity-preserving and Monotonicity-preserving Splines"; legend1 value=('Non-monotonicity-preserving spline' 'Monotonicity-preserving spline') label=none; symbol1 value=dot interpol=spline color=black width=5; symbol2 value=none interpol=join color=red; proc gplot data=plot; plot y*x=1 msplint*x=2/overlay legend=legend1; run; quit;