why open figure new window!
Mostrar comentarios más antiguos
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!
Respuestas (2)
Walter Roberson
el 17 de En. de 2013
Try changing
axes(hand.axes1);
plot(t(6),data);
to
plot(hand.axes1, t(6), data);
1 comentario
huong
el 17 de En. de 2013
Image Analyst
el 17 de En. de 2013
0 votos
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 comentarios
leo
el 7 de Mayo de 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
el 8 de Mayo de 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.
Categorías
Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!