How to access variable values at certain times in simulink
15 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Sujit Muduli
2018-3-5
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!