Hi, I need to interface MATLAB with a COM port to read data from sensors. Here is my MATLAB code.
s = serial('COM5');
s.BaudRate = 115200;
for i = 1:25
an = fscanf(s,'%c');
I have used "tic" "toc" for measuring execution time to read 25 values and its almost 5 seconds. This is pretty slow. 115200 is the max Baud Rate.
Is there a better/faster way to read from a serial port???