Any way to have a function return a variable dynamically

1 view (last 30 days)
I want a function to return a variable with a dynamic name so returns variable mar19 for today. Is this possible
  1 Comment
Oleg Komarov
Oleg Komarov on 19 Mar 2012
I pointed out one use with assignin but I would not recommend it.
Read which is strictly related and specifically concentrate on the dynamic structure.

Sign in to comment.

Accepted Answer

Chad Greene
Chad Greene on 19 Mar 2012
Combined with the above comment from Oleg, if you only need today's date, this will be useful:
Formatted the way you suggest,

More Answers (0)


Find more on Numeric Types in Help Center and File Exchange


No tags entered yet.

Community Treasure Hunt

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

Start Hunting!

Translated by