matlab,帮我看看这道题~
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/14 04:27:45
matlab,帮我看看这道题~
![](http://img.wesiedu.com/upload/c/4b/c4bc77eb72ce5b2e7119bac06d4b20d9.jpg)
![](http://img.wesiedu.com/upload/c/4b/c4bc77eb72ce5b2e7119bac06d4b20d9.jpg)
![matlab,帮我看看这道题~](/uploads/image/z/3393360-0-0.jpg?t=matlab%2C%E5%B8%AE%E6%88%91%E7%9C%8B%E7%9C%8B%E8%BF%99%E9%81%93%E9%A2%98%7E)
x=[1 11 21 31 41 51 61 71 81 91 101];
Lgx=[0 1.0414 1.3222 1.4914 1.6128 1.7076 1.7853 1.8513 1.9085 1.959 2.0043];
p=polyfit(x,Lgx,5);
fitx=1:0.1:101;
fity=polyval(p,fitx);
plot(x,Lgx,'ro');hold on;
plot(fitx,log(fitx)/log(10),'r-');
plot(fitx,fity,'k-');hold off;
再问: ����˵��ÿ����˼·��лл
再答: x=[1 11 21 31 41 51 61 71 81 91 101];Lgx=[0 1.0414 1.3222 1.4914 1.6128 1.7076 1.7853 1.8513 1.9085 1.959 2.0043];p=polyfit(x,Lgx,5);%��������Ϊ����ʽy=p(1)x^5+p(2)x^4+p(3)x^3+p(4)x^2+p(5)x+p(6) fitx=1:0.1:101;%��ɵȼ��0.1����1��101�ĺ��������fity=polyval(p,fitx);%�����ϵĶ���ʽ�ͺ�����������plot(x,Lgx,'ro');hold on;%��Ԫ���ɢ��plot(fitx,log(fitx)/log(10),'r-');%������lg(x)������plot(fitx,fity,'k-');hold off;%����϶���ʽ������
Lgx=[0 1.0414 1.3222 1.4914 1.6128 1.7076 1.7853 1.8513 1.9085 1.959 2.0043];
p=polyfit(x,Lgx,5);
fitx=1:0.1:101;
fity=polyval(p,fitx);
plot(x,Lgx,'ro');hold on;
plot(fitx,log(fitx)/log(10),'r-');
plot(fitx,fity,'k-');hold off;
再问: ����˵��ÿ����˼·��лл
再答: x=[1 11 21 31 41 51 61 71 81 91 101];Lgx=[0 1.0414 1.3222 1.4914 1.6128 1.7076 1.7853 1.8513 1.9085 1.959 2.0043];p=polyfit(x,Lgx,5);%��������Ϊ����ʽy=p(1)x^5+p(2)x^4+p(3)x^3+p(4)x^2+p(5)x+p(6) fitx=1:0.1:101;%��ɵȼ��0.1����1��101�ĺ��������fity=polyval(p,fitx);%�����ϵĶ���ʽ�ͺ�����������plot(x,Lgx,'ro');hold on;%��Ԫ���ɢ��plot(fitx,log(fitx)/log(10),'r-');%������lg(x)������plot(fitx,fity,'k-');hold off;%����϶���ʽ������