Prev: how i can compute the men and the variance of an color image
Next: Pipelined datapath single cycle processor
From: antonello on 25 May 2010 05:39 I'm trying to make a matlab program with gui that performs in order after pressing button 1) Acquire a variable B from an edit text box 2) calculating an array function f (B) 3) choose from a menu pop up wich matrix from the array F(B) has to be plotted. What order should I follow in the gui matlab script? The order that I gave to it in the m-file is: In the part named "Executes just before mfile name is made visible" i put B=str2double(get......) and formulas to calculate f(B) then i put in the function popmenu1_Callback(hObject.........) this rows: switch get(hObject,'Valure') case 1 case 2 etc etc to choose wich matrix has to be plotted and finally i put in the function push button istrutions to plot This script does not work, how can I change it? this is one of the message error Undefined function on method "edit1_callback' for input arguments..... edit1 is the tag of my edit text boxx thanks
From: antonello on 25 May 2010 08:08 Now I understand what is the problem with the script. I need ,that every time I pressed pushbotton in my script it was possible to rerun the instructions that are present in the code part call "executes just before ......". How can i do this? How can I repeat parts of the code already written pressing the pushbutton in Gui? thx "antonello " <antonello9774(a)hotmail.com> wrote in message <htg5rq$1mb$1(a)fred.mathworks.com>... > I'm trying to make a matlab program with gui that performs in order after pressing button > > 1) Acquire a variable B from an edit text box > 2) calculating an array function f (B) > 3) choose from a menu pop up wich matrix from the array F(B) has to be plotted. > > What order should I follow in the gui matlab script? > > The order that I gave to it in the m-file is: > In the part named "Executes just before mfile name is made visible" > i put B=str2double(get......) and formulas to calculate f(B) then i put in the function popmenu1_Callback(hObject.........) this rows: > switch get(hObject,'Valure') > case 1 > case 2 > etc etc to choose wich matrix has to be plotted > and finally i put in the function push button istrutions to plot > > This script does not work, > > how can I change it? > this is one of the message error > Undefined function on method "edit1_callback' for input arguments..... > edit1 is the tag of my edit text boxx > > thanks
From: Steven Lord on 25 May 2010 10:10
"antonello " <antonello9774(a)hotmail.com> wrote in message news:htgej4$kv$1(a)fred.mathworks.com... > Now I understand what is the problem with the script. > I need ,that every time I pressed pushbotton in my script it was possible > to rerun the instructions that are present in the code part call > "executes just before ......". How can i do this? > > How can I repeat parts of the code already written pressing the > pushbutton in Gui? Create a function that contains the code you want to run in various places, and call the function in all those various places. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com |