How can I plot data from imported tables in app designer?
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have imported an excel file into an app and have selected specific columns which i wish to plot. However, I still recievce "Error using plot Invalid data argument" on the line of the plot.
t = readtable('ForceTime.xlsx', 'Sheet', 1);
% Time
app.UITable.Data = t(42:end,1);
app.UITable.ColumnName = 'Time';
Tnum = table2array(t(42:end,1));
% Force
app.UITable2.Data = t(42:end,13);
app.UITable.ColumName = 'Force';
Fnum = table2array(t(42:end,13));
% Force-Time Plot
plot(app.UIAxes, Fnum, Tnum, 'r-');
Is there anything I am missing or need to change for the plot to work?
0 Commenti
Risposte (1)
Mario Malic
il 9 Ott 2020
Check both Fnum, Tnum, are their values correct? Since you're reading the Excel file, they might be character arrays.
0 Commenti
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!