why open figure new window!
Ältere Kommentare anzeigen
I use serial connection matlab:
function BytesAvailable_Callback(obj,event)
global hand;
data=fscanf(obj,'%d',1);
t=clock;
set(hand.uitable1,'data',data);
axes(hand.axes1);
plot(t(6),data);
and before i had write in funtion_OpeningFcn:
global hand;
hand = handles;
guidata(hObject, handles);
result: uitable1 display data received but axes1 no. And open figure new window!
thanks!
Antworten (2)
Walter Roberson
am 17 Jan. 2013
Try changing
axes(hand.axes1);
plot(t(6),data);
to
plot(hand.axes1, t(6), data);
1 Kommentar
huong
am 17 Jan. 2013
Image Analyst
am 17 Jan. 2013
0 Stimmen
If you do not already have a figure open with an axes on it called axes1, then it will probably open a new figure. Why does this callback not have handles as the third argument? Did you use GUIDE?
2 Kommentare
leo
am 7 Mai 2013
I'm in final project and encounter the same problem, but in my profet, I want to display an image in an axes: when I code:
function BytesAvailable_Callback(obj,event)
global hand;
global ind;
ind = fscanf(obj)
axes(hand.image)
imshow('anh.jpg');
But it alway open in new window? Could you help me? Please.
Image Analyst
am 8 Mai 2013
It should not - there is no call to figure. Are you using GUIDE? If so, why is handles not in the callback argument list? What is hand? Print out, or check on, the value of hand.image and make sure it's the same floating point number each time, like 178.012 or whatever. If it's the same number it should go to the same axes.
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!