MATLAB: In an assignment A(I) = B, the number of elements in B and I must be the same.
The very common MATLAB error: “In an assignment A(I) = B, the number of elements in B and I must be the same.” occurs when one side of an assignment has a dfferent dimension than the other. So for instance the left side of the assignment might be a vector and the target on the left is a scalar. The problem might be that both sides are vectors, but one is a different length than the other. In this video Doug shows two ways to debug this common situation.
댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.