how to simplify a symmatrix expression
조회 수: 15 (최근 30일)
이전 댓글 표시
Three symmatrix type variables: Cn, MW0 and MDW0. I apply the command "simplify(Cn*(MW0+ MDW0) - Cn*MW0)" and I hope it output " Cn * MDW0". However, I only got an error "Incorrect number or types of inputs or outputs for function 'simplify' ". How to solve this issue? The following code block could reproduce this error. Thanks a lot.
syms MW0 [3 3] matrix
syms MDW0 [3 3] matrix
syms Cn [3 3] matrix
detlaC_1 = BiasCdiff1 - Cdiff1
sipReC_1 = simplify(BiasCdiff1 - Cdiff1) % the line throw out error
댓글 수: 0
답변 (1개)
Walter Roberson
2022년 10월 1일
syms MW0 [3 3] matrix
syms MDW0 [3 3] matrix
syms Cn [3 3] matrix
expression = Cn*(MW0+ MDW0) - Cn*MW0
class(expression)
So the expression returns a symmatrix not a sym and not a symfun
methods(expression)
Notice that simplify() is not one of the listed methods. Which is to say, that simplify() is not defined for expressions involving symmatrix.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
