Progressive graph/plots

8 次查看(过去 30 天)
Sachin Shridhar Paradkar
I have 7000 iteration/plots which have been taken every second from the 1st second to the 7000th second and all of this has to be plotted into one graph progressively. The figure below is the plot/graph of the first second. Is there a function to do this?
Is there a possibility to have all the data linked to a single graph and then have a slider of some sorts on the graph to see all the various iterations depending on what one would like to see?
data_plot.PNG
  1 个评论
Agnish Dutta
Agnish Dutta 2019-3-18
编辑:Agnish Dutta 2019-3-18
If you want a slider that changes the plot, then what could be done is to use MATLAB appdesigner and include all necessary elements such as an 'Axes' object to display the selected plot and a 'Slider' object with a callback that changes the selected plot. A callback is basically a function that is executed when a specific Event such as moving a slider is triggered. Objects such as buttons, sliders and checkboxes can trigger events.
Next you'll need a way to import data for the needed plots. For that you can use a 'Text Field' along with a browse 'Button'. Add a call back to the Button click event containing the function 'uigetfile'. This will allow you to get the file as well as the path at which your data is stored.
[file,path] = uigetfile % returns the file name and path to the file when the user clicks Open. If the user clicks Cancel or the window close button (X), then uigetfile returns 0 for both of the output arguments.
The callback function on the slider can now use the data from the file returned by uigetfile function to plot the required graph on the Axes object. For example, given x and y you can generate a plot with the following code:
x = linspace(-pi,pi,50);
y = 5*sin(x);
plot(ax,x,y)
Relevant links:
App Designer) Create UI axes for plots in App Designer:https://www.mathworks.com/help/matlab/ref/uiaxes.html.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by