⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 do_csplines.m

📁 辛普森方法
💻 M
字号:
%do_csplines.mKC = 1; dy0 = 2; dyN = 2; % with specified 1st derivatives on boundaryx = [0 1 2 3]; y = [0 1 4 5];xi = x(1)+[0:200]*(x(end)-x(1))/200; %intermediate points[yi,S] = cspline(x,y,xi,KC,dy0,dyN); % %cubic spline interpolationclf, plot(x,y,'ko',xi,yi,'k:')yi = spline(x,[dy0 y dyN],xi); %for comparison with MATLAB built-in ftnhold on, pause, plot(x,y,'ro',xi,yi,'r:')yi = spline(x,y,xi); %for comparison with MATLAB built-in ftnpause, plot(x,y,'bo',xi,yi,'b')KC = 3; [yi,S] = cspline(x,y,xi,KC);% with the 2nd derivatives extrapolatedpause, plot(x,y,'ko',xi,yi,'k')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -