- Add a Product block into the model
- Double click on the block
- Under 'Number of inputs' section replace the number '2' with the right-matrix division symbol ' / '
- Select 'Multiplication' as 'Matrix(*)'
Why am I getting a wrong matrix inverse when using a Math Function block set to 'pow' in Simulink?
조회 수: 2 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2017년 12월 15일
답변: MathWorks Support Team
2018년 1월 11일
I want to calculate a matrix inverse in Simulink. For example, for matrix A = [4 0; 0 16]. I am using a Math Function block set to 'pow' to do the inverse. However, I get erroneous result as below:
A^-1 = [0.25 inf; inf 0.0625]
rather than
A^-1 = [0.25 0; 0 0.0625]
채택된 답변
MathWorks Support Team
2017년 12월 15일
Using the Math Function block set to 'pow' to do the inverse operation does the element-wise inverse rather than inverting the whole matrix. To carry out a matrix inverse, please follow the steps below:
This will return the matrix inverse.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!