Wild cards for variable names

7 views (last 30 days)
Meli
Meli on 31 Oct 2013
Edited: Azzi Abdelmalek on 31 Oct 2013
Hi,
i have a series of vectors whose name start with HCE. For example: HCEcool, HCElighting, HCEth.
I would like to add them up without going through the trouble of writing them all out. Is there a wild card that would allow me to do this?
Something like HCE* for example?
Thanks!
Meli

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 31 Oct 2013
Edited: Azzi Abdelmalek on 31 Oct 2013
s=whos('HCE*')
out={s.name}
  1 Comment
Azzi Abdelmalek
Azzi Abdelmalek on 31 Oct 2013
Edited: Azzi Abdelmalek on 31 Oct 2013
[Meli commented]
Excellent!
Thanks!
Meli

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!