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)
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/06 20:57:47
![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)](/uploads/image/z/3164773-13-3.jpg?t=matlab%E4%B8%AD%E4%B8%80%E4%BA%9B%E6%96%B0%E6%89%8B%E9%97%AE%E9%A2%98%2Csyms+x+y%3By+%3Dezplot%28%271%2F5%2A%28-2-5%2F%28-125%2B100%2Asin%28x%29%29%2A%28-20%2Asin%28x%29%2B40%2B10%2A%28-121%2Asin%28x%29%5E2-100%2Asin%28x%29%2B121%2B100%2Asin%28x%29%5E3%29%5E%281%2F2%29%29%2B5%2F2%2Asin%28x%29%2F%28-125%2B100%2Asin%28x%29%29%2A%28-20%2Asin%28x%29%2B40%2B10%2A%28-121%2Asin%28x%29%5E2-100%2Asin%28x%29%2B121%2B100%2Asin%28x%29%5E3%29%5E%281%2F2%29%29%29%2Acos%28x%29)
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)
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中一些新手问题,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)
总感觉你好像末尾多了一个括号
改成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函数中只能是表达式,即不可以使用点乘、除等运算符,也就是不能直接复制粘贴计算用的公式。