So im using matlab for reading an Arduino, which I have programmed for sending data at 50Hz (1 sample per 0.02 sec).
And the problem Im facing is that matlab is reading those samples too slow.
I made a simple script to check the time it takes to read one sample:
s = serial(seriallist,'BaudRate',9600,'Terminator','CR');
linea = fscanf(s);
It takes 1,98 seconds for reading and I dont really understand why.
I really want it to go at 50Hz since what Im attempting to do is to plot the data on real time using a while (1) loop, and the latency right now is too high for the application to run smoothly.
Thanks in advance.