Hello,
this is one part of arduino code
Serial.print("\t");
Serial.print(freq(), DEC);
Serial.print("\t");
Serial.print("");
Serial.print(osvet(), DEC);
Serial.println("\t");
it gives me this results on Serial Monitor (where the left column is counter), and the other two columns are other data
1 800 86956
2 800 86956
3 790 85869
4 790 85869
5 780 84782
6 780 84782
7 780 84782
8 780 84782
9 780 84782
10 790 85869
Ok, now I want to read this in Matlab
s = serial('COM4', 'BaudRate', 9600);
fopen(s);
for i= 1:2000
data=fscanf(s);
y(i)=str2double(data);
plot(i,y(i));
drawnow;
hold on
end
fclose(s);
but I want to plot third column (y), and first coulmn (x)...
actually I want to do that:
.
.
.
plot(data(:,1),data(:,3);
drawnow;
.
.
.
so, is it possible, and how?
thank you for your help!!!