3d animation of a slice plot

조회 수: 10 (최근 30일)
Paul
Paul 2011년 3월 11일
Thanks in advance,
I am trying to create a 3d slice plot animation that changes each slice as the movie progresses. My code is as follows:
figure
slice(arrayD,1,1,1);
shading interp;
set(gcf,'NextPlot','replacechildren')
numframes=6;
A=moviein(numframes);
for i=1:numframes
slice(arrayD,i*21,131*i,i*13);
shading interp;
A(i)=getframe;
end
movie(A,3,1);
Doesn't seem to be working however. Exercise is now becoming counter productive. A little help.
Thanks,
Paul
  댓글 수: 2
Oleg Komarov
Oleg Komarov 2011년 3월 11일
What doesn't work? You get an error message or unexpected behavior?
Can you post an example of arrayD?
Paul
Paul 2011년 3월 16일
I don't think I can attach a .mat file of arrayD. I am not getting any errors just when it tries to make a movie it tries to "map" it into a 2d environment (which just appears blank)...

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2011년 3월 16일
using:
arrayD = rand(300,300,300);
Works for me.

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by