Using Simulink.Parameter in Matlab Function to make number of loops calibrateable
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Pascal Knappe
el 29 de Jul. de 2022
Respondida: Pascal Knappe
el 22 de Ag. de 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 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Software Development Tools en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!