real time plot in gui

4 次查看(过去 30 天)
lafe
lafe 2017-3-8
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?

回答(1 个)

Geoff Hayes
Geoff Hayes 2017-3-8
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.

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by