It seems that PLOT command is being bypass and not being execute..
Mostra commenti meno recenti
delete(instrfindall)
clear all;clc
s = serial('COM6');
fopen(s)
A1 = 0; B1 = 0;
for i = 1:1000
P = fscanf(s,'%f')
if P == 1
A1 = A1+1; B1 = B1;
elseif P == 2
A1 = A1-1; B1 = B1;
elseif P == 3
A1 = A1; B1 = B1+1;
elseif P == 4
A1 = A1; B1 = B1-1;
else
end
plot(A1,B1,'*')
hold on
end
fclose(s)
delete(instrfindall)
I have written this code. I am receiving serially data very wel . But plot command is not being executed. As well * is not moving accordingly. Please correct me.
Risposta accettata
Più risposte (1)
Walter Roberson
il 14 Mag 2016
After the
hold on
add
set(gca, 'xlimmode', 'auto', 'ylimmode', 'auto')
1 Commento
Nimisha
il 15 Mag 2016
Categorie
Scopri di più su Axis Labels in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!