Piloting graph in app designer
Ältere Kommentare anzeigen
Hello friends.
I am trying to create an app in Matlab app designer to plot data from tables.
I want the app to sum the second and third columns then plot the sum of these columns various the first column in the table.
i am facing proplem "Unrecognized method, property, or field 'Var1' for class 'matlab.ui.control.Table'" when i am trying to plot variables i hope you could help me with this problem.
Akzeptierte Antwort
Weitere Antworten (1)
Cris LaPierre
am 15 Jun. 2020
Bearbeitet: Cris LaPierre
am 15 Jun. 2020
I suspect the variables app.BS.Var1 and app.BS.Var2 don't exist. Perhaps the variable app.BS.Data.Var1 does?
Still, there is an easier way to do this.
- Create a new table variable that is the sum of columns 2 and 3
- Plot column one vs the new column
app.BS.Data.sumVars = app.BS.Data(:,2)+app.BS.Data(:,3);
plot(app.UIAxes,app.BS.Data(:,1),app.BS.Data.sumVars)
3 Kommentare
Bilal Larouzi
am 15 Jun. 2020
Cris LaPierre
am 15 Jun. 2020
Bearbeitet: Cris LaPierre
am 15 Jun. 2020
Try updating it to
app.BS.Data.sumVars = app.BS.Data.(2)+app.BS.Data.(3);
plot(app.UIAxes,app.BS.Data(:,1),app.BS.Data.sumVars)
If that doesn't work, please save your variable BS to a mat file and attach it to your post.
Bilal Larouzi
am 15 Jun. 2020
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
