MATLAB y=(x.*sinx)./(1+(cosx.^2));

来源:学生学帮网 编辑:学帮网 时间:2024/06/03 17:10:29

MATLAB y=(x.*sinx)./(1+(cosx.^2));

y=(x.*sin(x) )./(1+(cos(x).^2));
# 少了2对()

在matlab中,函数应该都要加括号的,应改为:
y=(x.*sin(x))./(1+(cos(x).^2));