adding string to MATLAB workspace

4 views (last 30 days)
Hi, is there is a way I can add sting to my workspace ? and how can I read the workspace value ? in other hand, how to display this value in GUI static text ???
thanks a lot guys :)

Accepted Answer

Daniel Shub
Daniel Shub on 21 May 2012
While you can do these things. Please don't.
To assign a string to your workspace:
assignin('base', 'mystr', 'Hello World')
To read the workspace value
evalin('base', 'mystr')
To set the value to a GUI text box with handle h
set(h, 'String', evalin('base', 'mystr'))
Again, please don't do this.

More Answers (0)

Categories

Find more on Variables 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!