I'm doing tutorials in Matlab for school, testing what should and shouldn't work. So when I tried subtrating a 1xn matrix from an mx1 matrix and vice versa, it resulted in an nxn matrix in both cases when it should have resulted in:
"??? Error using ==> -
Matrix dimensions must agree."
according to the tutorial.

 채택된 답변

Voss
Voss 2024년 2월 18일
편집: Voss 2024년 2월 18일

1 개 추천

Sounds like the tutorial is for an older version of MATLAB, and the behavior changed since then. Here is an article related to that change.

https://blogs.mathworks.com/loren/2016/10/24/matlab-arithmetic-expands-in-r2016b/

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품

릴리스

R2023b

질문:

2024년 2월 18일

편집:

2024년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by