I want to visualize data from a swarming simulation. For this sake, I generate textured surface objects, rotate and place them according to the data from the simulation. I also do an animation, where I manipulate the XData and YData properties of the surface objects and update the figure with drawnow. This all works fine. The problem is the following: The same code runs much faster with the older 2014a version of Matlab. Profiling the code, I realized that much more time is spent for drawnow in 2014b. The speed is relevant to me, since I want to do a real-time application.
The following example should be faster on 2014a than it is on 2014b:
I have done some tests and it appears, that the computing time depends on the texture resolution. When I simulate this on my machine (iMac with Mac OS 10.7 Lion, Core 2 Duo 3 GHz) with different texture resolutions, I get the following computing times for the different Matlab versions:
I have also tried this on a Windows machine (Intel Core i7 860, 2.8 GHz) and observed the same behaviour. If you have read this far, thanks :-) I'm looking forward to your suggestions.