Auto save figure from frame data-set

1 view (last 30 days)
Dai Tran
Dai Tran on 24 Dec 2018
Commented: Dai Tran on 24 Dec 2018
I would like to draw and autosave the surface form frame data-set (151x151x800)
Therefore, here is my question:
Input: frame dataset (151x151x800)
Output: 800 .jpg image
Thank you for your help.
surf(frame(:,:,1)); axis tight; view(0,90); shading interp
.
.
.
surf(frame(:,:,800)); axis tight; view(0,90); shading interp
  • Sample code
image.jpg
  • Sample surface image

Accepted Answer

KSSV
KSSV on 24 Dec 2018
Let A be your 151x151x800 data.
[nx,ny,nz] = size(A) ;
for i = 1:nz
pcolor(A(:,:,i)) ;
axis tight
shading interp
saveas(gcf,[num2str(i),'.jpg'])
end

More Answers (0)

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!