Why can I not plot in app designer?

조회 수: 22 (최근 30일)
Lala0099
Lala0099 2019년 4월 13일
답변: Chris Portal 2019년 4월 14일
Hey everyone. I am trying to import three numbers into an array called A, and just simply plot them in app designer. But the graph I have does not show up anything... it just does not plot... I genuinely don`t understand why...
% Button pushed function: StartanalysisButton
function StartanalysisButtonPushed(app, event)
A = importdata('jerk_metric.txt');
app.UIAxes.YLim = [-1 1];
app.UIAxes.XLim = [-1 1];
plot(app.UIAxes, A);
end
  댓글 수: 3
Lala0099
Lala0099 2019년 4월 13일
A is just 3 numbers: 0.54,0.65,0.43 It does fit in the limits
Lala0099
Lala0099 2019년 4월 13일
I have 6 .m files all connected and the variables stored in A are the result of a function. So i tried saving it in differemt files tyoes (txt, xls) but could not use it in gui or app designer

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

채택된 답변

Chris Portal
Chris Portal 2019년 4월 14일
The data doesn’t fit within your limits. By only specifying the A vector you mentioned, you are only specifying the Y axes values to PLOT. This means PLOT uses [1 2 3 ...] as your X axes values, which puts your data outside the limits you specified.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by