Assign a value to a static text in GUI MATLAB

Achraf picture Achraf · May 27, 2010 · Viewed 41.4k times · Source

How can I assign a value to a static text in a MATLAB GUI?

Answer

Doresoom picture Doresoom · May 27, 2010

Double click on your text in guide to open the property editor, then edit the 'String' property. You can also set the 'Tag' property so you can edit it while your GUI is running. If you set your tag to mytext, you can change the static text to 'MyString' with the following line:

set(handles.mytext,'String','MyString')