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/12/25 00:03:06
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));