Using Simulink.Parameter in Matlab Function to make number of loops calibrateable
1 view (last 30 days)
Show older comments
Pascal Knappe
on 29 Jul 2022
Answered: Pascal Knappe
on 22 Aug 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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Software Development Tools in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!