MATLAB: Problems to open images after I have saved it in a folder

folderimagesproblemssaving

Hello, I have a problem with my work. My program can read some images from a specific folder, process and study them (differents features of them). When I have processed these images, I would save them in a different folder than the original. I did it, but when I want to open these (with Paint or another), it's impossible. I have been searching, but I can't find a good solution and neither my fault. This is my code:
function mostrar2
%load my processed images (for the moment are matrix)
load archivoimagenesfinales
[stat,struc] = fileattrib;
PathCurrent = struc.Name;
FolderName = ['imagenes'];
PathFolder = [PathCurrent '/RESULTADOS DE ESTUDIOS DE IMAGENES/' FolderName];
mkdir([PathCurrent '/RESULTADOS DE ESTUDIOS DE IMAGENES/'], FolderName);
for k=1:length(grupoimage)
matriz=grupoimage(k).im;
imagennumero=sprintf('imagentratada%d.bmp',k);
%save as image in the usual folder
imwrite(matriz,imagennumero);
save([PathFolder imagennumero])
end
end
Thanks in advance

Best Answer

Why is the save() function call in there??? Can you attach one of the files that it made?