f



getting values from edit text of GUI

Hi,
I am new user of MAT LAB.
I want to get value from edit text of GU I.
So that I can use this value entered by the user when displayed by
GUI, in main m.-file which is the main program I am writing.

Please help.

With regards.
0
3/8/2006 11:05:12 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
281 Views

Similar Articles

[PageSpeed] 32

str=get(editBoxHandle, 'string');

if it's a numerical value:
num= str2num(str);

0
itdevries (101)
3/8/2006 3:03:41 PM
Hello,

I am also working on developing a GUI for my application. I am
encountering a couple of problems.
First is that I am using the same code you have jolted down, but the
'num' (variable as below) remains only in the edit box callback
function. I want it to be available as matlab workspace variable so
that I can use it in rest of the program.
Second in my GUI the user is supposed to fill a bunch of variables.
But the callbacks execute individually everytime a change is made. I
want something like a RUN button that executes the entire GUI once
the user is done entering the variables.

Please help

thanks

Igor wrote:
>
>
> str=get(editBoxHandle, 'string');
>
> if it's a numerical value:
> num= str2num(str);
>
>
0
3/8/2006 3:46:41 PM
I am using the same code you have jolted down, but the
'num' (variable as below) remains only in the edit box callback
function. I want it to be available as matlab workspace variable so
that I can use it in another program.
I actually want to pass this value in another function/program.

please help.
0
3/10/2006 9:33:45 AM
prashant shah wrote:
> I am using the same code you have jolted down, but the
> 'num' (variable as below) remains only in the edit box callback
> function. I want it to be available as matlab workspace variable so
> that I can use it in another program.
> I actually want to pass this value in another function/program.
> 
> please help.

help guidata
help evalin
help assignin
help global
help setpref
help getpref

where using guidata is the cleanest solution

michael
0
themiwi (854)
3/10/2006 9:57:19 AM
Reply: