cd('........')
output_file='.......';
gif_name = 'test.gif';
for count = 0:50;
...
data_figure = figure('Visible','off');
axes1 = axes('Parent', data_figure, 'ZGrid', 'on', 'YGrid', 'on');
view(axes1,[0.5 90]);
xlim(axes1,[-0.01 0.25]);
hold(axes1, 'all');
surf(data_A,data_B,data_C, 'Edgecolor', 'none');
colorbar;
xlabel('........');
ylabel('.........');
set(gca, 'XGrid', 'off');
ylabel(colorbar, '.......');
saveas(gcf, fullfile(output_file, [num2str(count),'.png']));
frame = getframe(1);
im = frame2im(frame);
[AA,map] = rgb2ind(im,256);
if count == 0,
imwrite(AA,map,gif_name,'gif','LoopCount',Inf,'DelayTime',1);
else
imwrite(AA,map,gif_name,'gif','WriteMode','append','DelayTime',1);
end
end