Code Segment works in Command Window but not in script
이전 댓글 표시
Error Message: "Incorrect dimensions for matrix multiplication."
Variables: X(5000 x 400) and theta (10 X 400);
Code: prob = X * theta';
This code works in the command window but when I try to run this segment of code in a script it gives me the shorten-error message above. Any suggestions on how to make the code run in the script?
댓글 수: 2
Walter Roberson
2021년 1월 17일
dbstop if error
Then run your code. When it stops at that line,
size(X), size(theta)
Vista Marston
2021년 1월 17일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!