matlab运行出错 x = 1:10:1000;y = -500:10:500;C=14831./(pi.*0.314278.*x.^0.876088.*0.057025.*x.^1.0935.*1.72+eps).*exp(-0.5.*(y./(0.314278.*x.^0.876088+eps)).^2).*exp(-0.5.*(80./( 0.057025.*x.^1.0935+eps)).^2);mesh(X,Y,C); 程序运行提示Error

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 03:25:27
matlab运行出错x=1:10:1000;y=-500:10:500;C=14831./(pi.*0.314278.*x.^0.876088.*0.057025.*x.^1.0935.*1.72+e

matlab运行出错 x = 1:10:1000;y = -500:10:500;C=14831./(pi.*0.314278.*x.^0.876088.*0.057025.*x.^1.0935.*1.72+eps).*exp(-0.5.*(y./(0.314278.*x.^0.876088+eps)).^2).*exp(-0.5.*(80./( 0.057025.*x.^1.0935+eps)).^2);mesh(X,Y,C); 程序运行提示Error
matlab运行出错
x = 1:10:1000;
y = -500:10:500;
C=14831./(pi.*0.314278.*x.^0.876088.*0.057025.*x.^1.0935.*1.72+eps).*exp(-0.5.*(y./(0.314278.*x.^0.876088+eps)).^2).*exp(-0.5.*(80./( 0.057025.*x.^1.0935+eps)).^2);
mesh(X,Y,C);
程序运行提示
Error using ./
Matrix dimensions must agree.

matlab运行出错 x = 1:10:1000;y = -500:10:500;C=14831./(pi.*0.314278.*x.^0.876088.*0.057025.*x.^1.0935.*1.72+eps).*exp(-0.5.*(y./(0.314278.*x.^0.876088+eps)).^2).*exp(-0.5.*(80./( 0.057025.*x.^1.0935+eps)).^2);mesh(X,Y,C); 程序运行提示Error
1:10:10000是1000个数(第1001个数是10001>10000,被舍去);而-500:10:500是1001个数,所以个数不匹配.可以改成-500:10:499