matlab function block querry

Sir i am using matlab function block and i want to terminate my execution when undesirable results are prouduced can u please tell the syntax or code just like exit is used in c programming

Risposte (2)

Bhaskar R
Bhaskar R il 7 Feb 2020
Modificato: Bhaskar R il 7 Feb 2020

0 voti

Use command exit or quit

1 Commento

Function 'quit' is not supported for code generation and the coder.extrinsic directive cannot be applied to 'quit'. Rewrite your code so it does not use 'quit'.
i am getting this error

Accedi per commentare.

Walter Roberson
Walter Roberson il 7 Feb 2020

0 voti

https://www.mathworks.com/help/simulink/slref/stopsimulation.html
You could emit an output which indicates whether to stop and connect to a Stop Simulation block

2 Commenti

Thank you for your attention sir,
I want this as a part MATLAB function block code
i want to terminate the execution through command

Accedi per commentare.

Richiesto:

il 7 Feb 2020

Community Treasure Hunt

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

Start Hunting!

Translated by