I Want to display, in listbox, the data received in COM port. I can show the incoming data in listbox using push button. The data is showing exactly as long as I use push button, but after removing the push button and only using listbox [putting code in listbox's callback] nothing is showing. How can I use listbox to execute the code and shows what it is getting in COM port?
function listbox1_Callback(hObject, eventdata, handles)
s = serial ('COM6');
scanText = fscanf(s);
data = scanText;