Divide by zero protection in generated Simulink code

조회 수: 41 (최근 30일)
James
James 2013년 2월 20일
I'm trying to understand what kind of protection I can get against division by zero, both at the model level and in the C/C++ code.
One option I've thought about has been to create my own divisor block, where I can control the divisor/denominator away from 0 if it ever is zero. Is this the only way, or am I missing something existing in Simulink or in the code to help with this?

채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 2월 20일
편집: Kaustubha Govind 2013년 2월 20일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by