Last active
November 5, 2018 13:44
-
-
Save embedded4ever/90eb553da82b04d88fa623ad87eacc6f to your computer and use it in GitHub Desktop.
Load .mat file and save image as png in matlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%open .mat file and saveas .png in matlab | |
% you must edit load(sprintf('%d.mat',i)) | |
% i have file like 1.mat , 2.mat , 3.mat ,4.mat ,5.mat ,6.mat | |
for i=1:6 | |
load(sprintf('%d.mat',i)) | |
x = cjdata.image; | |
imshow (x,maps); | |
h=figure(1); | |
saveas(h,sprintf('%d.png',i)); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment