Show All packet Data

Dear All, is it possible or not to show all data in same time. for example i have matrix 3x4 from RF device,i want to acces this data use GUI Matlab as the interface, when i used this code below
function rxButton_Callback(hObject, eventdata, handles)
try
RxText = fscanf(handles.serConn);
currList = get(handles.history_box, 'String');
if length(RxText) < 1
RxText = 'Timeout = ';
set(handles.history_box, 'String', ...
[currList ; [RxText datestr(now)] ]);
else
set(handles.history_box, 'String', ...
[currList ; ['Received = ' datestr(now) ': ' RxText] ]);
end
set(handles.history_box, 'Value', length(currList) + 1 );
catch e
disp(e)
end
data were shown only a row, to show the others one we must push the button, how to make it continously (all data/matrix 3x4 shown in same time) Thanks for your help..

답변 (1개)

Walter Roberson
Walter Roberson 2011년 6월 14일

0 개 추천

currList = cellstr( get(handles.history_box, 'String') );
if length(RxText) < 1
currList{end+1} = sprintf('Timeout = %s', datestr(now));
else
currList{end+1} = sprintf('Received = %s: %s', datestr(now), RxText);
end
set(handles.history_box', 'String', currList, 'Value', length(currList));

댓글 수: 2

zaini
zaini 2011년 6월 14일
Thanks Mr. Walter,
hm.m. but when i used your code above,,
it didn't make anything change,,
may be you have the other solution?
thanks alot
Walter Roberson
Walter Roberson 2011년 6월 14일
Put the code in a loop.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2011년 6월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by