필터 지우기
필터 지우기

Random graph showing up on my GUI?

조회 수: 2 (최근 30일)
Amed
Amed 2013년 2월 14일
답변: Alan Hidalgo 2017년 1월 25일
Hello. Can someone please point to me why my GUI background turns into a plot graph while trying to run accelerometer data? Here is the only button it occurs on
% --- Executes on button press in Read.
function Read_Callback(hObject, eventdata, handles)
% hObject handle to Read (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%COMPORT
comPort = '/dev/tty.usbmodemfa131';
%READS SERIAL
[accelerometer.s,serialFlag] = setupSerial(comPort);
calCo = calibrate(accelerometer.s);
%READS DATA
a = 0;
if a == 0
[gx gy gz] = readAcc(accelerometer,calCo);
cla;
r = sqrt((gx^2)+(gy^2)+(gz^2));
r
end
guidata(hObject, handles);
  댓글 수: 4
Amed
Amed 2013년 2월 14일
help
Amed
Amed 2013년 2월 14일
anything

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

답변 (2개)

Image Analyst
Image Analyst 2013년 2월 14일
Are you sure you didn't place a gigantic axes control behind all your other controls on your GUI? And then somehow (not shown here) you plot something to it? What gets plotted? Is it anything you recognize?
  댓글 수: 3
Amed
Amed 2013년 2월 14일
so lost
Image Analyst
Image Analyst 2013년 2월 14일
I can't run it without the fig file. Upload it and the m-file somewhere and tell us where.

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


Alan Hidalgo
Alan Hidalgo 2017년 1월 25일
Hey Amed, I had the same issue with a realtime plot in which I had to open another Gui. Whenever I opened the other Gui, its background had the realtime plot on it too. I have no idea how to fix this with code, I just edited the second Gui and made a much bigger textbox that would cover up the entire frame of the Gui and it did the trick, the graph is no longer visible where it must not. You should give it a try.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by