App Designer - Plotting from Arrays

I would just like to plot the values from 2 colums of an array:
x = app.Attitude_input{:, 1};
y = app.Attitude_input{:, 2};
plot(app.UIAxes, x, y);
But I always get this error:
Error in Plotting_APP/PlotButtonPushed (line 178)
x = app.Attitude_input{:, 1};
Surely this should be simple...but I can't find any solution. Any ideas?
Thanks

답변 (1개)

Allen
Allen 2022년 10월 19일

0 개 추천

If the data type of your x and y variables is a double-array, then you are using the wrong syntax to access the data. Use parenthesis, (), in lieu of curly brackets, {}. Curly brackets would be applicable if the x and y variables contain table data.

댓글 수: 1

SteveM
SteveM 2022년 10월 19일
Thanks for the suggestion, but I tried this first (yes the data is stored as doubles").
Same result... error.

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

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2022년 10월 19일

댓글:

2022년 10월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by