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)
MOHAMED ABDO
MOHAMED ABDO le 28 Fév 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
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
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)

Community Treasure Hunt

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

Start Hunting!

Translated by