How to access variable values at certain times in simulink
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm writing this code that takes an output after a simulation is over for x y z positions. When I use the simout block, it says the data is [1x2000x501 double], 2000 x y or z positions for 2000 elements and 501 times. I want the variable value at 0 time and 500 time, but when I say x(1,1:2000,501) for instance, x doesn't contain any time values so it gives me an error. The little notes in simulink also say the value is only 1,2000, and I know it is because when I accessed x at different times it always came out at the same value even though the x position changes. How do I extract the value at a certain time?
0 commentaires
Réponses (1)
Sujit Muduli
le 5 Mar 2018
Hi Nahn,
Could you please let me know about the format how simout block is storing the data? Are you storing it differently for x, y and z positions?
Again when you said x(1,1:2000,501) which x you are referring to here? Please attach necessary files so I could have a look at it.
Thanks, Sujit
Voir également
Catégories
En savoir plus sur Simulink Functions 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!