You are on page 1of 2

clear all;

clc;
close all;
comport=serial(com1,baudrate,9600);
fopen(comport);
x=0;
while(x<500)
x=x+1;
y1(x)=fscan(comport,%f);
y2(x)=fscan(comport,%f);
drawnow;
plot (y1,d--);
plot (y2d--);
grid on;
hold on;
pause 0.6;
end
fclose(comport);
delete (comport);

You might also like