Unable to perform assignment because the left and right sides have a different number of elements.
조회 수: 1 (최근 30일)
이전 댓글 표시
Please I need help with my code, it is giving me this error and I can't fix it. Thanks for helping...
댓글 수: 0
채택된 답변
KSSV
2020년 11월 22일
The error is clear; when you try to save more number of elements in an array which initialized with less number.
Example:
A = zeros (1.10);
A (1) = rand;
A (2) = rand (1,2); % this will throw error, you have to save only one element but you are saving two elements
In your case, check what is dimension of RHS created and what dimension LHS is initialized.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!