function [res] = INTE(J,JJ) % This function is used by Cubic Spline Rayleigh Ritz Method % (Algorithm 11.6). res = JJ-J+3;
Cubic+Spline 源代码
汇集 Cubic+Spline 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
x=0:.12:1; y=(x.^2-3*x+5).*exp(-5*x).*sin(x); plot(x,y,x,y,'o') x1=0:.02:1; y0=(x1.^2-3*x1+5).*exp(-5*x1).*sin(x1); y1=interp…
x=0:8; y=sin(x); x1=0:.1:8; y1=interp1(x,y,x1,'nearest') ; y2=interp1(x,y,x1,'linear') ; y3=interp1(x,y,x1,'spline') ; y4=in…
x=0:.12:1; y=(x.^2-3*x+5).*exp(-5*x).*sin(x); plot(x,y,x,y,'o') x1=0:.02:1; y0=(x1.^2-3*x1+5).*exp(-5*x1).*sin(x1); y1=interp…
%例16-3 外插运算方法和误差 x = 0:10; y = sin(x); xi=5:0.25:15; yi=sin(xi); y1=interp1(x,y,xi,'nearest') y1=interp1(x,y,xi,'nearest','e…
x=0:.12:1; y=(x.^2-3*x+5).*exp(-5*x).*sin(x); plot(x,y,x,y,'o') x1=0:.02:1; y0=(x1.^2-3*x1+5).*exp(-5*x1).*sin(x1); y1=interp…
function v = splinetx(x,y,u) %SPLINETX Textbook spline function. % v = splinetx(x,y,u) finds the piecewise cubic interpolatory…
axis([-3 3 -3 3 -5 20]) % 确定坐标轴的范围 [X,Y] = meshgrid(-3:.5:3); % 生成网格 Z = peaks(X,Y); % 计算peaks函数值 figure(1) mesh(X,Y,Z) % …
% 题目: % 假设一曲线采样点为 % x = 0:2:4*pi;y = sin(x).*exp(-x/5); % 试将 x 的间距调成 0.1,并用下列方法进行内插: % 1) 线性内插法 (method='linear')。 %…
x=0:.12:1; y=(x.^2-3*x+5).*exp(-5*x).*sin(x); plot(x,y,x,y,'o') x1=0:.02:1; y0=(x1.^2-3*x1+5).*exp(-5*x1).*sin(x1); y1=interp…