I would like to store the names of some variables in my workspace into a string array given a prefix. In particular, I have 'Xaws1', 'Xaws2', 'Xaws3' variables other than others in my workspace, and I want their names to populate an array which would look something like {'Xaws1', 'Xaws2', 'Xaws3'}. In my case all the variable names have the same length (5 characters), and I'd like to find them using a prefix like "Xaws*". I tried with who('Xaws*), but the output seems not usable in this sense. I also looked into this post, but could not find a solution so far. Any idea would be very appreciated, thanks in advance.
mardi 4 août 2015
MATLAB: create a string array with a list of variable names with a given prefix
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire