hello i need some help:
이전 댓글 표시
i working for one code, but i want to use the reponse to a resolution eqution with solve to continuous my work, but i have this error : i working for one code, but i want to use the reponse to a resolution eqution with solve to continuous my work, but i have this error : X = privBinaryOp(A, B, 'symobj::zip', '_subtract'); i need some help to resolv this problem
댓글 수: 1
Geoff Hayes
2022년 6월 11일
@Rosmael zidane lekeufack - what is the error message? what is the code that generates the error?
답변 (1개)
Walter Roberson
2022년 6월 11일
0 개 추천
That error can have two causes:
- you might be trying to subtract two objects of fundamentally different sizes, such as trying to subtract a vector of length 3 from a vector of length 4
- you might be trying to take advantage of implicit expansion, such as trying to subtract the mean of each row (a vector) from each row in a 2d array. If you were working with numeric objects in any reasonably new version of MATLAB, then MATLAB would automatically extend the vector into a 2d array to match. However when you work with Symbolic variables, MATLAB does not do the expansion, and would give you the error you saw.
If you are trying to take advantage of expansion, then use bsxfun or (often easier) repmat the variables to be matching sizes.
But if you are just trying to subtract things of different sizes, then you need to fix your logic.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!