Plot multiple contourf and save into jpegs

时间:2015-07-31 20:10:37

标签: image matlab

I need to use the following several times. How can I save multiple jpegs?

Here "B" is an 'm by n' matrix. I have multiple such matrices.

figure

contourf(B,zlevs,'LineStyle','none');
colormap jet
colorbar 

  hold all
  plot(512,512,'k.')

  print('file_name_001','-djpeg')

1 个答案:

答案 0 :(得分:0)

for i = 1:n
f = figure;
contourf(B,zlevs,'LineStyle','none');
colormap jet
colorbar 
hold all
plot(512,512,'k.')
print(['file_name_00',num2str(i),'.jpg','-djpeg')
close(f)
end