How to access variable values at certain times in simulink
조회 수: 16 (최근 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!