p7_1.m

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

M
15
字号
% P7_1.M Fit a 6th order polynomial to data and plot results%x=-3:3;y=[0.6 0.2 0.6 3.0 0.6 0.2 0.6];%fprintf(' Coefficients of 6th order polynomial')p=polyfit(x,y,6)xplot=[-4:0.01:4];f=polyval(p,xplot);%clfplot(x,y,'o',xplot,f,'-')title('Polynomial fit 6th order')axis([-4 4 -1 3.5])grid 

⌨️ 快捷键说明

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