![]() |
如何在Matlab中自动旋转3d指纹图?
我在Matlab中有一个3D直方图。是否有可能自动旋转,即获得3D效果。我想将其显示为PowerPoint中3d直方图旋转的视频。
谢谢 [B]回答:[/B] 一种比较麻烦的方法是使用[URL="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/view.html"]view[/URL]命令手动旋转图表。您可以使用此命令更新任何3D图的方位角和高程视图。 要创建视频,需要使用如下命令序列捕获绘图窗口(注意,您将获得灰色背景,因此您可能希望更改背景颜色): % create figure and get handle to it (store handle in hf) hf = figure(1); % [create 3d plot] % Create file to hold the animation aviobj = avifile('mymovie.avi', 'compression', 'Cinepak'); % loop with some criteria for rotation while(...) % update view using view command view(az, el); % get Matlab to flush the drawing buffer (effectively forces a plot update) drawnow; % capture frame and write to the avi file aviobj = addframe(aviobj, hf); end % end loop % Close movie (flushes write buffer and finishes the video) aviobj = close(aviobj); 您可以使用没有avifile内容的相同策略,使用Matlab中的脚本来旋转绘图,尽管您可能希望使用pause命令来减慢帧更改的速度。 [url=https://stackoverflow.com/questions/2048177]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 04:52。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.