Extracting and using the values of variables in workspace in a loop

Hi everyone. I am new to MATLAB and need a help.
I have a LARGE amount of data stored as matrices of different sizes. I have loaded them in the workspace and now need to manipulate them (particularly use integration). I was wondering if anyone knows of a way to extract the values of the variables in workspace in a loop (one by one, or in a certain sequence). All I could do was to use a function "who" but it only gives the names of the variables and if I say type:
a=who; a(1);
it gives me the name of the variable, while i need to work with the matrix itself.

Réponses (2)

clear all
x = 1:10;
y = 4;
a = whos;
eval(a(1).name)
eval(a(2).name)
But what is it that you are really wanting to accomplish? There must be a way to do what you want to do without such wizardry...

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by