Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit:

How to pass values from GUI to workspace

Asked by Arun Badigannavar on 4 Dec 2012

How to pass values from GUI to workspace


Arun Badigannavar



2 Answers

Answer by Vishal Rane on 4 Dec 2012

Refer this : Assignin


Vishal Rane
Answer by Jan Simon on 4 Dec 2012

To which workspace? Each function has its own one. Do you mean the base-workspace, which is available in the command window? Then:

assignin('base', 'A', 123 + 17)

Please note, that using such remote-creation of variables frequently will make it much harder to debug your program. Imagine you have tweo different GUIs which assign the same variable. Then it is impossible to find the function, which has applied the last changes.


Jan Simon

Contact us