ex7_2.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 15 行
M
15 行
% EX7_2.M Spline interpolation of the function y=1/(1+x^2)% with a cubic polynomialx=[-5:1:5]; % N+1=11 pointsy=1./(1+x.^2); % Runge function% Spline functionxspline=[-5:.1:5]; % Finer spacing in xyspline = spline(x,y,xspline);% Plotclf % Clear any figuresplot(x,y,'o',xspline,yspline,'-')title('Spline Function Interpolation Figure 7.2')axis([-6 6 -.5 2])%% Modify the script to allow spline fitting of general% functions
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?