3D matrix surface plot animation

11 Ansichten (letzte 30 Tage)
average.student
average.student am 9 Jun. 2021
Kommentiert: Star Strider am 9 Jun. 2021
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?

Akzeptierte Antwort

Star Strider
Star Strider am 9 Jun. 2021
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 Kommentare
average.student
average.student am 9 Jun. 2021
It worked! Many thanks
Star Strider
Star Strider am 9 Jun. 2021
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by