How can I Plot a graph in real time
Mostrar comentarios más antiguos
Hello everybody. I am kind of new to plotting, and I am trying to create a graph that updates every one second. Every one second I get a number from a device (for my y-axis), and ecerytime I get a number I want the graph to plot it on a time x-axis.
I would also like to change the xlim everytime it reaches the ebd, so the picture will "move" to the right with the plotting.
Any ideas?
Thanks in advance, Sagi.
Respuestas (1)
Azzi Abdelmalek
el 10 de Jul. de 2016
Look at this example
figure
hold on
for k=1:100
y(k)=sin(k)
pause(1)
plot(y)
end
1 comentario
Sagi Sagi
el 10 de Jul. de 2016
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!