How to link the contain of one push button to another in MatLab GUI?
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
Hi, May i know how to link the contain in listbox to another push button? For instance, I have selected the com port and there for the com port will be used to connect using the command serial ('COM'), may i know how can i do so?Meaning i choose from the listbox which COM i going to use then will automatically link to the command serial('COM') to connect?Thanks in advance for your kind help.
0 Kommentare
Akzeptierte Antwort
  Matt Fig
      
      
 am 8 Mär. 2011
        In the callback for the pushbutton, get the string and value of the listbox and use the value as an index into the string.
C = get(listboxhandle,{'string','value'}); % Use correct handle
chosen_comport = C{1}(C{2});  % The com port string name
% Here call SERIAL or whatever with chosen_comport argument.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!