I have an app that I am using to display a large data file. I am selecting a column of data from that file using a listbox and then would like to display that data on a plot. I use a global variable to hold the Structure (U), then get the field names using fieldnames(app.U). The field names fill a listbox, which the user can then select the particular field they want to display in the plot. Then I fill another array with just the values from that field using value = app.DataListBox.Value; app.MyValues= getfield(app.U,(value));
I have a pushbutton I want to use to then display the data on UIAxes.
% Button pushed function: PlotButton function PlotButtonPushed(app, event)
plot(app.UIAxes, app.MyValues) end
When I run the app, I can open the file-select the field I want to display and then push the Plot Button, nothing shows up in the plot. I don't know if the array app.MyValues is being filled. In MATLAB there is a workspace window I can see my variables, where are they viewable in Appdesigner for debug? Is there a workspace window in Appdesigner that shows the current values of the global properties?
You can put a breakpoint in your app designer function similar to MATLAB function point by clicking the (-) next to the line number. When the execution will reach the breakpoint, the app will stop and all the app variables will appear in workspace window. You can check their values in Command window and debug your app.