Handling serial communication for data acquisition in MATLAB
I need to capture data from a sensing device from serial port using MATLAB. The program needs to read 500 miliseconds of data (sampled at 1000 Hz) and stay idle until a new data package arrives with the results of the calculations that the sensing device perform in the meantime. How can I handle this idle state without making the timeout exception from serialread terminate my program?