Hello!
I have a 3D matrix with multiple layers. I want to simulate these layers in an animated surface plot in a way that e.g. every second a new layer is shown. Is it possible to do that? If yes, how?

 採用された回答

Star Strider
Star Strider 2021 年 6 月 9 日

0 投票

Try this —
M = rand(10,10,5); % Create Test Matrix
figure
for k = 1:size(M,3)
surf(M(:,:,k))
axis([0 11 0 11 0 1])
drawnow
pause(1)
end
Thsi works correctly in R2021a.

2 件のコメント

average.student
average.student 2021 年 6 月 9 日
It worked! Many thanks
Star Strider
Star Strider 2021 年 6 月 9 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Animation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by