作业帮 > 综合 > 作业

matlab中一些新手问题,

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/06/25 15:39:44
matlab中一些新手问题,
syms x y;
y =ezplot('1/5*(-2-5/(-125+100*sin(x))*(-20*sin(x)+40+10*(-121*sin(x)^2-100*sin(x)+121+100*sin(x)^3)^(1/2))+5/2*sin(x)/(-125+100*sin(x))*(-20*sin(x)+40+10*(-121*sin(x)^2-100*sin(x)+121+100*sin(x)^3)^(1/2)))*cos(x)/(sin(x)^2-1))');
ezplot中的公式是通过matlab运算出来的,但是直接复制上去画图那边却出现如下的问题
Error using ==> inlineeval
Error in inline expression ==> 1./5.*(-2-5./(-125+100.*sin(x)).*(-20.*sin(x)+40+10.*(-121.*sin(x).^2-100.*sin(x)+121+100.*sin(x).^3).^(1./2))+5./2.*sin(x)./(-125+100.*sin(x)).*(-20.*sin(x)+40+10.*(-121.*sin(x).^2-100.*sin(x)+121+100.*sin(x).^3).^(1./2))).*cos(x)./(sin(x).^2-1))
Error:Unbalanced or misused parentheses or brackets.
Error in ==> inline.feval at 34
INLINE_OUT_ = inlineeval(INLINE_INPUTS_,INLINE_OBJ_.inputExpr,INLINE_OBJ_.expr);
Error in ==> specgraph\private\ezplotfeval at 54
z = feval(f,x(1));
Error in ==> ezplot>ezplot1 at 434
[y,f,loopflag] = ezplotfeval(f,x);
Error in ==> ezplot at 140
[hp,cax] = ezplot1(cax,f{1},vars,labels,args{:});
Error in ==> Untitled4 at 2
y =ezplot('1/5*(-2-5/(-125+100*sin(x))*(-20*sin(x)+40+10*(-121*sin(x)^2-100*sin(x)+121+100*sin(x)^3)^(1/2))+5/2*sin(x)/(-125+100*sin(x))*(-20*sin(x)+40+10*(-121*sin(x)^2-100*sin(x)+121+100*sin(x)^3)^
>>
matlab中一些新手问题,
总感觉你好像末尾多了一个括号
改成y=ezplot('1/5*(-2-5/(-125+100*sin(x))*(-20*sin(x)+40+10*(-121*sin(x)^2-100*sin(x)+121+100*sin(x)^3)^(1/2))+5/2*sin(x)/(-125+100*sin(x))*(-20*sin(x)+40+10*(-121*sin(x)^2-100*sin(x)+121+100*sin(x)^3)^(1/2)))*cos(x)/(sin(x)^2-1)');再试试