The "Elastic" script works perfectly on OS X, but crashes on Windows 7,8,10. Why?
1 次查看(过去 30 天)
显示 更早的评论
The "Elastic" script works perfectly on OS X, but crashes on Windows 7,8,10. Why?
4 个评论
Walter Roberson
2015-10-21
Do you mean that a movie is produced, but the Windows movie players will not play it?
采纳的回答
Walter Roberson
2015-10-22
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!