Info

この質問は閉じられています。 編集または回答するには再度開いてください。

hello everyone .can anyone help me and explain to me this codes for real time ploting????please????

1 回表示 (過去 30 日間)
mark spectre
mark spectre 2022 年 5 月 28 日
閉鎖済み: John D'Errico 2022 年 5 月 28 日
arduino=serial('COM10','BaudRate',9600);
fopen(arduino);
CM(1)=0;
time(1)=0;
i=1;
tic;
while (toc<=100)
CM(2)=fscanf(arduino,'%f');
time(2)=toc;
figure(1);
grid on;
axis([toc-10, toc+10, 0, 35])
h(i)=plot(time,CM,'b','LineWidth',5);
hold on
CM(1)=CM(2);
time(1)=time(2);
if(i >= 300)
delete(h(i-299));
end
i=i+1;
end
fclose(arduino); % end communication with arduino

回答 (0 件)

この質問は閉じられています。

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by