p7_12.m

来自「Advanced Engineering Mathematics using M」· M 代码 · 共 15 行

M
15
字号
% P7_12.M Plot the Legendre approximation to an odd function%  f(x)= signum(x)   [-1 1]%% The Legendre series is%  fapprox(x)=  (3/2)P1 - (7/8) P3 = (45/16)x - (35/16) x^3 %x=[-1:.01:1];p=[(-35/16) 0 (45/16) 0];y=polyval(p,x);plot(x,y)%% Add annotation to the graph.%

⌨️ 快捷键说明

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