The "Elastic" script works perfectly on OS X, but crashes on Windows 7,8,10. Why?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Vadim Tambovtsev
il 21 Ott 2015
Risposto: Walter Roberson
il 22 Ott 2015
The "Elastic" script works perfectly on OS X, but crashes on Windows 7,8,10. Why?
4 Commenti
Walter Roberson
il 21 Ott 2015
Do you mean that a movie is produced, but the Windows movie players will not play it?
Risposta accettata
Walter Roberson
il 22 Ott 2015
I tried it on OS-X.
You need to set the surf() to use 'EdgeColor', 'none' or else you will get plots that are all black.
You can improve performance by doing the surf() only once and then in the iterations afterwards, set() the ZData property of the surface.
You can improve performance by pre-allocating the m structure array, and using n as the index instead of l.
I have attached Elastic.m with the performance changes.
However
Your values grow without bounds, mostly 0 except for a positive and negative spike. Eventually the difference between the maximum and minimum values exceeds 10^38, the single precision maximum range. At least in R2014a (might have changed as of R2014b), that exceeds the limits of what can be plotted in a single graph and the plot stops rendering.
Even without the change, the movie being created is really boring, consisting of a mostly flat surface with a narrow spike up and down, with the level of the flat surface moving up and down as the z coordinates automatically adjust to center whatever the spike range happens to be on any one iteration. You cannot really tell there is anything going on unless you pay close attention to the exponent in scientific notation given for the z axis, which keeps increasing until it reaches 10^38 and then the graphics vanish.
Please go back and recheck that you are using the same MATLAB releases between the machines. If you had R2014b or later on OS-X you just might happen to get graphics all the way through (no promises, I cannot test with that release) whereas if you happened to have earlier releases on the Windows machines you might get a different result.
You might also get a different result on the Windows machines if you commanded
opengl software
On my R2014a OS-X, opengl software is the only possibility, but it is switchable on MS Windows.
I think you need to go back and check if you intend that the values of the spikes grow past +/- 10^38. It seems an odd thing to graph.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Graphics Performance in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!