matlab 用plot画曲线命令出错程序如下:syms x>> syms y>> y=1.2-0.8*erf(x/0.76)-0.3*erf((10-x)/0.76)y =6/5-4/5*erf(25/19*x)+3/10*erf(-250/19+25/19*x)>> x=0:0.01:10;>> plot(x,y);Error using ==> plotConversion to double from sym is not possib
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/29 18:31:54
![matlab 用plot画曲线命令出错程序如下:syms x>> syms y>> y=1.2-0.8*erf(x/0.76)-0.3*erf((10-x)/0.76)y =6/5-4/5*erf(25/19*x)+3/10*erf(-250/19+25/19*x)>> x=0:0.01:10;>> plot(x,y);Error using ==> plotConversion to double from sym is not possib](/uploads/image/z/1745229-21-9.jpg?t=matlab+%E7%94%A8plot%E7%94%BB%E6%9B%B2%E7%BA%BF%E5%91%BD%E4%BB%A4%E5%87%BA%E9%94%99%E7%A8%8B%E5%BA%8F%E5%A6%82%E4%B8%8B%EF%BC%9Asyms+x%3E%3E+syms+y%3E%3E+y%3D1.2-0.8%2Aerf%28x%2F0.76%29-0.3%2Aerf%28%2810-x%29%2F0.76%29y+%3D6%2F5-4%2F5%2Aerf%2825%2F19%2Ax%29%2B3%2F10%2Aerf%28-250%2F19%2B25%2F19%2Ax%29%3E%3E+x%3D0%3A0.01%3A10%3B%3E%3E+plot%28x%2Cy%29%3BError+using+%3D%3D%3E+plotConversion+to+double+from+sym+is+not+possib)
matlab 用plot画曲线命令出错程序如下:syms x>> syms y>> y=1.2-0.8*erf(x/0.76)-0.3*erf((10-x)/0.76)y =6/5-4/5*erf(25/19*x)+3/10*erf(-250/19+25/19*x)>> x=0:0.01:10;>> plot(x,y);Error using ==> plotConversion to double from sym is not possib
matlab 用plot画曲线命令出错
程序如下:
syms x
>> syms y
>> y=1.2-0.8*erf(x/0.76)-0.3*erf((10-x)/0.76)
y =
6/5-4/5*erf(25/19*x)+3/10*erf(-250/19+25/19*x)
>> x=0:0.01:10;
>> plot(x,y);
Error using ==> plot
Conversion to double from sym is not possible.
请问怎么解决?
matlab 用plot画曲线命令出错程序如下:syms x>> syms y>> y=1.2-0.8*erf(x/0.76)-0.3*erf((10-x)/0.76)y =6/5-4/5*erf(25/19*x)+3/10*erf(-250/19+25/19*x)>> x=0:0.01:10;>> plot(x,y);Error using ==> plotConversion to double from sym is not possib
因为y 还是符号型的,不是double.
应该是:
syms x
syms y
y=1.2-0.8*erf(x/0.76)-0.3*erf((10-x)/0.76)
x=0:0.01:10;
plot(x,eval(y));