Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Why is the state of action subsystem checked in generated code
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I just worte a matlab level-2 function and created a simple simulink model, refer the figures.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157067/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157068/image.jpeg)
The code generator creates the following code:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157070/image.jpeg)
The "if statements" at line 43 and 47 are absolutely unnecessary. They just compares the logic state differen between the current and previous function call.
I am sure there is something wrong configed within my matlab level-2 function. But I don't know what.
please help me to eliminate the unnecessary code lines
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!