From GUI to workspace (Matlab)

Status
Not open for further replies.

El-Hadidy

Member level 1
Joined
Feb 23, 2006
Messages
37
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,537
Hello,

Using the push button in GUI it is possible to make a variable like y to be equal to 5. The problem is that the variable y is not shown or saved in the workspace.

How to make it available in the workspace?

Thank you

El-Hadidy
 

hi
You open help and use function "evalin",this function is used to pass variable from on caller wrokspace to base wokspace and back.Read it carefully and you will do. Or and very easy way is that using "global" .You declare y is global variable :
In function of push button you write: global y;
After you push putton just enter "global y" in Matlab command window.you will see variable y

regards.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…