Effacer les filtres
Effacer les filtres

How can I apply a command [select a section of data] to all the variables and structures in my workspace?

1 vue (au cours des 30 derniers jours)
I thought of using logical operators but don't really know how to do it. Cheers!

Réponses (1)

Massimo Zanetti
Massimo Zanetti le 7 Oct 2016
Generally you can list them by command who and then evaluating a functional expression by eval.
For example assume you have x=[3,6] in workspace, then to get the mean:
C=who;
h=eval(['mean(',C{1},');']);
m=4.5

Catégories

En savoir plus sur Structures 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