Using Simulink.Parameter in Matlab Function to make number of loops calibrateable
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Pascal Knappe
le 29 Juil 2022
Réponse apportée : Pascal Knappe
le 22 Août 2022
Hello,
I have a Matlab Function in Simulink, which contains a for loop. The number of loops should be calibrateable and therefore is defined by a Simulink.Parameter.
for i = 1:MySimulinkParameter_C
% do stuff
end
% **** ERROR ****
But this seems to lead to an error. In the diagnostic viewer I only get the message " **** Error **** ".
When I change the upper value to a hard coded value I get no error
for i = 1:10
% do stuff
end
% no error
Does someone know the reason for this issue or can explain, how to furter debug this?
Thanks in advance!
2 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Software Development Tools dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!