How can I load a .dat file and its corresponding image (.jpg) together on the GUI of matlab?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Titli
el 6 de Ag. de 2017
Comentada: Titli
el 8 de Ag. de 2017
Hi all,
I am trying to show an image(.jpg) and its data (.dat) together on GUI matlab one by one from a folder containing 100 images and 100 .dats, and I want to select few of them (correct ones) and then save the correct images and correct .dat files into another folder.
I am already able to do it with the .jpg, i.e. I can see images one by one and save the correct ones. I just want to combine the corresponding .dat files with it.
I am new with programming and any help of yours is highly appreciated.
Thanks in advance!
0 comentarios
Respuesta aceptada
Walter Roberson
el 6 de Ag. de 2017
[filepath, basename, ext] = fileparts(NameOfJPEGFile);
datfilename = fullfile( filepath, [basename '.dat']);
if ~exist(datfilename, 'file')
error('File "%s" has no corresponding .dat file "%s"', NameOfJPEGFile, datfilename);
end
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!