I want to use arduino uno for multichannel EMG signal acquisition and plot and store each channel data in real time separately using matlab 17. i have already designed the system. Codes and error snapshot is attached herewith.
As Lee says it is a little unclear as to your set up. I see from your code that it seems you are using a com port communications to your arduino. However at a glance may have trouble with timings, if your communicating a 10bit number this will take at least 2 bytes of data (16 bits) at a speed of 15kHz this will need a baud rate of >240,000 (bits/s) to prevent data pile up, which is getting into the high speed realms of the serial port. So you may want to look into a faster USB form of communication if real time data is needed at this speed, or consider having some in circuit data buffer such as a FIFO. (Not a fan of big software like matlab etc.) you might also consider dumping your data straight from the "com port" to a file (with something like Realterm), and analising the data later to ensure there is no chance of the PC causing a data bottle neck.