Multi data set plots on App Designer

9 ビュー (過去 30 日間)
Dharmesh Joshi
Dharmesh Joshi 2022 年 12 月 23 日
回答済み: Cris LaPierre 2022 年 12 月 23 日
Hi
I am using App Designer and have placed an Ui Axes. I have two datasets that i would like to add on the same plot.
This is how i would do this in the traditional Matlab code as shown below.
But in App designer, i get the following error, what am i doing wrong?
Index exceeds the number of array elements. Index must not exceed 0.
Plot(x1,y1,x2,y2)

採用された回答

Cris LaPierre
Cris LaPierre 2022 年 12 月 23 日
MATLAB is case sensitive. Use plot instead of Plot
In app designer, you also need to specify which axes to plot into using the syntax plot(ax,___)
Here is what your code might look like, assuming you axes are labeled UIAxes
plot(app.UIAxes,x1,y1,x2,y2)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by