matrix dimensions must agree error

getting matrix dimensions must agree error with this line of code:
k = A.*(p.^2);

댓글 수: 1

Sriram Tadavarty
Sriram Tadavarty 2020년 4월 20일
편집: Sriram Tadavarty 2020년 4월 20일
What are the values of A and p?

답변 (1개)

Sriram Tadavarty
Sriram Tadavarty 2020년 4월 20일

0 개 추천

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

이 질문은 마감되었습니다.

질문:

2020년 4월 20일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by