store data associated with index in simulink and then export to workspace

1 回表示 (過去 30 日間)
Bhargav Jha
Bhargav Jha 2015 年 8 月 12 日
コメント済み: Bhargav Jha 2015 年 8 月 12 日
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

採用された回答

Azzi Abdelmalek
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 ExchangeSimulink Environment Customization についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by