store data associated with index in simulink and then export to workspace
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello I have a set of experiments in which I vary a constant number and observe the behavior of a vehicle live from the cameras. I want to record the 1000 samples of x and y coordinates for each of the constant values and store them in workspace. For example: when a = 1 I have an array of 1000 samples of x and y. when a = 2 again i have another 1000 samples and so on. For each a I want to store a separate data array with a different array_name in workspace. Can someone help me do this in simulink?
Thanks Bhargav
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2015년 8월 12일
This is a very bad idea to save your data with different names. Use a to workspace block to have your data in workspace. And one variable name A, it's easy to get each sample:
A(1,:)
A(2,:)
...
and so on
Why do you need to give a new name for each part of your matrix? It's easier to use one variable that contains all what you need, just provide the indices to locate what you want.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!