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

📄 func13.m

📁 数值分析最常用的四十种算法
💻 M
字号:
%func13
%polynomial Fitting,the residue analysis willbe show at the end
x=linspace(1,8,8)
y=[15.3,20.5,27.4,36.6,49.1,65.6,87.8,117.6];
y = log(y);
[p,S] = polyfit(x,y,1)
f = polyval(p,x);
y=exp(y)
f=exp(f)
plot(x,y,'o',x,f,'-')
disp(abs(norm(y,inf)-norm(f,inf)))
%b=0.29121601623819   a=2.43685970632819
%the residure is (defined by infinite norm on those vector) :0.0824
%can also see the figure

⌨️ 快捷键说明

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