MATLAB:Error using ==> inlineeval fplot('[ (1/((sqrt(2*pi))*1))*(exp(-(x.^2)/(2*1^2))),(1/((sqrt(2*pi))*2))*(exp(-(x.^2)/(2*2^2))),(1/((sqrt(2*pi))*4))*(exp(-(x.^2)/(2*4^2))),(1/((sqrt(2*pi))*(220/100)))*(exp(-(x.^2)/(2*(220/100)^2))) ]
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 00:46:39
MATLAB:Error using ==> inlineeval fplot('[ (1/((sqrt(2*pi))*1))*(exp(-(x.^2)/(2*1^2))),(1/((sqrt(2*pi))*2))*(exp(-(x.^2)/(2*2^2))),(1/((sqrt(2*pi))*4))*(exp(-(x.^2)/(2*4^2))),(1/((sqrt(2*pi))*(220/100)))*(exp(-(x.^2)/(2*(220/100)^2))) ]
MATLAB:Error using ==> inlineeval
fplot('[ (1/((sqrt(2*pi))*1))*(exp(-(x.^2)/(2*1^2))),(1/((sqrt(2*pi))*2))*(exp(-(x.^2)/(2*2^2))),(1/((sqrt(2*pi))*4))*(exp(-(x.^2)/(2*4^2))),(1/((sqrt(2*pi))*(220/100)))*(exp(-(x.^2)/(2*(220/100)^2))) ]',[-10,10])
MATLAB:Error using ==> inlineeval fplot('[ (1/((sqrt(2*pi))*1))*(exp(-(x.^2)/(2*1^2))),(1/((sqrt(2*pi))*2))*(exp(-(x.^2)/(2*2^2))),(1/((sqrt(2*pi))*4))*(exp(-(x.^2)/(2*4^2))),(1/((sqrt(2*pi))*(220/100)))*(exp(-(x.^2)/(2*(220/100)^2))) ]
将代码中的括弧、逗号换为半角的就可以了:
[(1/((sqrt(2*pi))*1))*(exp(-(x.^2)/(2*1^2))),(1/((sqrt(2*pi))*2))*(exp(-(x.^2)/(2*2^2))),(1/((sqrt(2*pi))*4))*(exp(-(x.^2)/(2*4^2))),(1/((sqrt(2*pi))*(220/100)))*(exp(-(x.^2)/(2*(220/100)^2)))]