Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
In an assignment A(I) = B, the number of elements in B and I must be the same. any help.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clear all
close all
clc
if ~isempty(instrfind)
fclose(instrfind);
delete(instrfind);
end
arduino=serial('COM1','BaudRate',9600); %5aly balak mn el baud rate w el COM number % create serial communication object on port COM18
fopen(arduino); % initiate arduino communication
CM(1)=0;
time(1)=0;
i=1;
tic;
while (toc<=20)
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',4);
hold on
CM(1)=CM(2);
time(1)=time(2);
if(i >= 300)
delete(h(i-299));
end
i=i+1;
% ew3a t7oot pause w 5aly el delay fee el arduino msh aktar mn 50
% milliseconds
end
fclose(arduino); % end communication with arduino
1 commentaire
dpb
le 28 Fév 2020
Well, not even a hint of which line erred???
I've expounded on the issue several questions the last couple days...search for answered_by: dpb and the phrase and should find at least two if not three or more...
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!