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/05/14 11:04:34

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)))]