登录论坛

查看完整版本 : 在MATLAB中一张一张地显示多个图形


poster
2019-12-14, 20:13
我有20个数字可以像幻灯片一样连续显示。我可以在Matlab中使用Imshow吗?任何帮助将不胜感激。



回答:

您可以使用MOVIE依次 (http://www.mathworks.com/help/techdoc/ref/movie.html)显示图/图像。为此,您创建人物,通过GETFRAME (http://www.mathworks.com/help/techdoc/ref/getframe.html)捕获它们,然后可以调用movie 。请参阅getframe帮助中的此示例

Z = peaks; surf(Z) axis tight set(gca,'NextPlot','replacechildren'); for j = 1:20 surf(sin(2*pi*j/20)*Z,Z) F(j) = getframe; end movie(F,20) % Play the movie twenty times

更多&回答... (https://stackoverflow.com/questions/5285476)