Unknown change in result across add block

Hi,
I'm running a relatively simple model that has four cases, one of which will only every be true. When the case is false, it returns a zero value. These four cases are connected to an ADD block so that the answer, which comes from the only true case and is non-zero.
The problem I'm having is that the result from the one true case changes from one side of the add block to the other for no apparent reason!
Has anyone come across this before, or have any idea how to solve it?
Thanks in advance, Sean

 채택된 답변

Andreas Goser
Andreas Goser 2011년 3월 9일

0 개 추천

This sounds like it could be a numerical issue related to signal data types / block data type setting. E.g. the add block could be set to some rounding or the block works in an unexpected way when you input logical.
You can also consider to use appropriate blocks from the "Logic and Bit Operations" library instead of the add block.

댓글 수: 1

Andreas Goser
Andreas Goser 2011년 3월 9일
Sounds like a good guess. Next time, you could add a screenshot :-)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by