real time plot in gui

4 visualizzazioni (ultimi 30 giorni)
lafe
lafe il 8 Mar 2017
Risposto: Geoff Hayes il 8 Mar 2017
hi!
I want some help with plotting.
I want to plot data in real time by using a GUI.The y-axe has amplitude and the x-axe has samples.
I want the x-axe to be updated after a specific amount of samples.
Firstly, it will be from 0 to 1000 and when it reaches the 1000 samples it will be updated in 1000 to 2000 and etc...
Any ideas?

Risposte (1)

Geoff Hayes
Geoff Hayes il 8 Mar 2017
lafe - how will you obtain the samples? Do you generate them or read them from some device? In any case, you may want to use a timer that will periodically query for or generate your samples and then plot them to an axes within your GUI. If you are using GUIDE, then take a look at https://www.mathworks.com/matlabcentral/answers/284202-how-to-plot-a-real-time-signal-with-axes-automatically-updating which will hopefully give you an idea on how you may do this.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by