Simulink While Loop - recording iteration-by-iteration parameters
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Per the title I am trying to record the evolution of parameters over While loop iterations by writing to a signal or workspace variable for later processing. It is clear that only the final states are available outside the While executed susbsystem.
My approach so far is to try and write some n-length vector of parameters vs iteration number as part of the While iteration. This vector would then be available when the While exits - recording the history.
The issue appears to be that in Simulink the signal widths/sizes need to be known at compile time, however I have no a priori knowledge of how many While iterations will run. This seems to be a fundamental problem that means I can't use the Assignment block, and I can't write a custom MATLAB function that outputs a signal (which could then be passed to the workspace)
It strikes me that if I could write directly to the workspace from inside a MATLAB fcn block I might circumvent the fixed widths of Simulink signals.
Perhaps somebody knows a way to do this?
Or perhaps my whole approach is wrong?
Thanks in advance for any pointers
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Test Model Components 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!