Info

此问题已关闭。 请重新打开它进行编辑或回答。

matrix dimensions must agree error

1 次查看(过去 30 天)
Roslyn Hurry
Roslyn Hurry 2020-4-20
关闭: MATLAB Answer Bot 2021-8-20
getting matrix dimensions must agree error with this line of code:
k = A.*(p.^2);

回答(1 个)

Sriram Tadavarty
Sriram Tadavarty 2020-4-20
Hi Roslyn,
I assume you provided an incompatible matrix size for the operation to be performed. You can look over this page for more insights of what might went wrong and will solve the issue. https://www.mathworks.com/help/matlab/matlab_prog/compatible-array-sizes-for-basic-operations.html
You can even go through the documentation of times function.
Hope this helps. Regards, Sriram

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by