Skip to content

Instantly share code, notes, and snippets.

View embedded4ever's full-sized avatar
🌴
Ireland

V embedded4ever

🌴
Ireland
View GitHub Profile
@embedded4ever
embedded4ever / matlab.m
Last active November 5, 2018 13:44
Load .mat file and save image as png in matlab
%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