Hey,
data = rand(20);
imagesc(data,'CDataMapping','scaled');
saveas(gcf, 'filename.png')
% Here, gcf --> Get Current Figure
% File can be saved in any of the allowed format
Hope this helps!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!