如何用matlab表示z= - x^2/10+y^2/10 我改了好多遍了,出现了如下问题:z= - x^2/10+y^2/10 Error using ==> ^Matrix must be square.>> z= - x.^2/10+y.^2/10Error using ==> +Matrix dimensions must agree.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 07:06:59
如何用matlab表示z= - x^2/10+y^2/10 我改了好多遍了,出现了如下问题:z= - x^2/10+y^2/10 Error using ==> ^Matrix must be square.>> z= - x.^2/10+y.^2/10Error using ==> +Matrix dimensions must agree.

如何用matlab表示z= - x^2/10+y^2/10 我改了好多遍了,出现了如下问题:z= - x^2/10+y^2/10 Error using ==> ^Matrix must be square.>> z= - x.^2/10+y.^2/10Error using ==> +Matrix dimensions must agree.
如何用matlab表示z= - x^2/10+y^2/10
我改了好多遍了,出现了如下问题:
z= - x^2/10+y^2/10
Error using ==> ^
Matrix must be square.
>> z= - x.^2/10+y.^2/10
Error using ==> +
Matrix dimensions must agree.

如何用matlab表示z= - x^2/10+y^2/10 我改了好多遍了,出现了如下问题:z= - x^2/10+y^2/10 Error using ==> ^Matrix must be square.>> z= - x.^2/10+y.^2/10Error using ==> +Matrix dimensions must agree.
先定义x和y,而且x和y 的维数必须一致.然后再输入z= - x.^2/10+y.^2/10

你的x和y的矩阵格式不一样(对于向量来讲就是数量不一样多),他不知道该怎么给你加了,否则后一种用法是对的。

你直接用x+y估计都会出现Matrix dimensions must agree.
正如上面所说,两个矩阵并不一致。