how to draw real time plot in guide matlab
Afficher commentaires plus anciens
i wrote simple code for read analog pin in arduino and plot the signal and i want to wrote simple code in GUI. i want to do just simple pushbutton and signal figure in side of it. when i clik pushbutton i want it to draw. how can i do this ?
help me please
here is my code;
clc; close all; clear all;
delete(instrfind(('Port'),('COM5')));
a=arduino('COM5');
tic;
i=0;
while toc<150
i=i+1;
time(i)=toc;
v(i)=readVoltage(a,'A0');
plot(time,v,'r')
drawnow
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!