columbushaa.blogg.se

Matlab 2017 how to switch off the real time plotting
Matlab 2017 how to switch off the real time plotting






matlab 2017 how to switch off the real time plotting

Set(figure_h.CurrentAxes, 'xtick', ) %#ok Set(figure_h, 'GraphicsSmoothing', 'Off') Set(figure_h, 'Position', ) %the size has a huge effect on performance %some random things that drastically speed up the plotting

matlab 2017 how to switch off the real time plotting

It would be nice to put the plot update on a separate thread, without jumping through the hoops of calling a separate Matlab process and communicating between the two. And if I change the timer period iteratively to get the same update rate for both, not surprisingly, it is almost exactly the same rate as I get with loop shown below. The two loop examples are not meant to get the same framerate, they are merely to demonstrate that when one changes the plot size (just manually grab a corner and adjust it, or use the position parameter) that the first example (serial) is hugely affected by the size, and the second example (random) is not.Īfter playing with a modified version of this where the plot is updated by a timer callback, I see that I can either make the serial read loop fast (~170Hz) or update the plot fast (~170Hz). Unfortunately, profile viewer (2017a) is unable to see inside the plotting, and just attributes all of the wait time to the serial port - which isn't possible, given the variable refresh rate described above (also, I've tested a bare-bones serial call and response, and the roundtrip for Matlab is under 8ms (~120fps)). However, when I use the exact same plot setup, but just plot data generated randomly for each loop, the refresh rate is unaffected by the size of the plot. When the plot is "normal" it'll get ~35fps, and as I shrink it, it'll go over 120fps.

matlab 2017 how to switch off the real time plotting

I'm plotting real-time data in Matlab (received through a serial port), and I found a curious way to affect the refresh rate: changing the size of the plot.








Matlab 2017 how to switch off the real time plotting