store data associated with index in simulink and then export to workspace
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Bhargav Jha
am 12 Aug. 2015
Kommentiert: Bhargav Jha
am 12 Aug. 2015
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 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 12 Aug. 2015
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!