Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2009-05-25
帖子: 4
声望力: 0 ![]() |
![]()
clear;clc;
x=[-150 -100 -50 0 50 70 100 150 200 250]; y=[0 0.01 0.28 0.56 0.78 0.8 0.65 0.45 0.1 0]; myfunc=inline('0.98*0.1683*exp(sqrt(pi)*x*beta(1)/321.9)-exp(sqrt(pi)*beta(2)/279.3*(x-(200-beta(3)-beta(4))*sin(beta(5)+10)/sin(beta(5))))','beta','x'); beta=nlinfit(x,y,myfunc,[2 2 15 15 30]); j=beta(1),k=beta(2),s1=beta(3),s2=beta(4),p=beta(5) %test the model xx=min(x):max(x); yy=0.98*0.1683*exp(sqrt(pi)*x*j/321.9)-exp(sqrt(pi)*k/279.3*(x-(200-s1-s2))*sin(p+10)/sin(p))); plot(x,y,'o',x,yy,'r') 运行时告诉我缺失符号。 ??? Error: File: e:\MATLAB6p5\work\shao1.m Line: 9 Column: 94 Missing operator, comma, or semicolon. |
![]() |
![]() |