Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
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

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 12 Août 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.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Environment Customization dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by