Infinite loop in Matlab Fctn Block
Afficher commentaires plus anciens
Why did I run into infinite loop (see coode below)? Also, I tried to stop the simulation by clicking on the stop button on the model window but it didn' work. i is the input from a ramp function in Simulink model. Thanks
function [y1,y2] = UPC(i) %#codegen persistent ii ii=0; if isempty(ii) y1=ii; y2=ii; else y1=i; y2=i; end while (i<5) y1=i+1; y2=i-1; end_ *_ *
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink Functions dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!