matlab7中 运行错误matlab7中 >> t=0:pi/150:3*pi; >> y1=cos(t)*exp(-t); 为什么一运行就提示 Error using ==> mtimesInner matrix dimensions must agree.

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/18 22:36:02

matlab7中 运行错误
matlab7中 >> t=0:pi/150:3*pi; >> y1=cos(t)*exp(-t); 为什么一运行就提示 Error using ==> mtimes
Inner matrix dimensions must agree.

t是一个向量,matlab中 * 指矩阵乘.
把 * 改成 .* 应该就可以了