bernapprox.m
来自「Mathematical Methods by Moor n Stiling.」· M 代码 · 共 23 行
M
23 行
% Plot Bernstein polynomials
% Copyright 1999 by Todd K. Moon
t = 0:.01:1;
subplot(2,2,1);
n = 5;
sum = 0;
for k=0:5
plot(t,bernpoly(n,k,t));
hold on
sum = sum +exp(k/n)* bernpoly(n,k,t);
end
xlabel('\itt');
ylabel('\itg_{nk}(\itt), k=0,1,...,5');
print -dps ../pictures/bernpoly.ps
clf
subplot(2,2,1);
plot(t,exp(t),t,sum,'--');
xlabel('\itt');
ylabel('\ite^t and approximation');
print -dps ../pictures/bernapprox.ps
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?