How can I update plots with large date

I have been developed the recording software for neural signal. DAQ board record signal in high sampling rate (20000kHz) on 32ch and send them to PC through USB. And I draw 32 subplot and plot 10000 samples on each channel (32 * 10000 = 320,000 samples)
set(dataLine, {'Ydata'}, num2cell(Amplifiers, 2));
I update using set function, and It spends about 15~18ms. Is there any method to make it faster? when I check the resources, my program used 20~30% of cpu, 5% of GPU, 4GB ram.

 Accepted Answer

Jan
Jan on 19 Sep 2017
You can try FEX: plot(big). If this cannot be used directly, it should contain some methods to reduce the data size while keeping the same output to the screen.
The "Douglas Peucker" algorithm can reduce the data set also, but I'd assume, that the time for the computations exceed the time for plotting the large vectors.
If you set Xlim and YLim of the axes to fixed values, Matlab does not waste time with determining the new limits in each iteration.

More Answers (0)

Asked:

on 19 Sep 2017

Answered:

Jan
on 19 Sep 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!