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

📄 triginterp.m

📁 Mathematical Methods by Moor n Stiling.
💻 M
字号:
% demonstrate trigonometric interpolation
% Copyright 1999 by Todd K. Moon

clear i;
N = 6;
t=0:(N-1);
f = t.^2;
beta = fft(f)/N
expt = exp(i*2*pi*t/N);
betar = fliplr(beta)
r = real(polyval(betar,expt))
ts = 0:.05:(N-1)
expts = exp(i*2*pi*ts/N);
figure(1);
subplot(2,2,1);
plot(t,r,'o',ts,real(polyval(betar,expts)))
axis([0 N-1 0 (N-1)^2+1]);
xlabel('\itt');
ylabel('\itf(\itt)');

subplot(2,2,2);
ts2 = 0:.05:2*(N-1);
expts2 = exp(i*2*pi*ts2/N);
plot(t,r,'o',ts2,real(polyval(betar,expts2)))
xlabel('\itt');
ylabel('\itf(\itt)');


⌨️ 快捷键说明

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