Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

im saving two images but how do i change their names ?

1 Ansicht (letzte 30 Tage)
hasan alhussaini
hasan alhussaini am 15 Sep. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi, Basically the code saves the two images, but how would i go about giving each image a name? because atm they are overwriting each other because i haven't assigned a name to them yet.
Savesinog = uigetdir(workdir,'Please select the destination directory');
imagetype= ['.tif']
FileName = fullfile(Savesinog,imagetype)
imwrite(sinog_2,FileName);
imwrite(iradonsinog,FileName);
  2 Kommentare
Adam
Adam am 15 Sep. 2017
Just add a name into the fullfile call. You have a directory and an extension at the moment with no filename.
FileName = fullfile( Savesinog, someFilename, imagetype );
Stephen23
Stephen23 am 15 Sep. 2017
Bearbeitet: Stephen23 am 15 Sep. 2017
fullfile does not magically append the file extension, this has to be done independently of fullfile:
FileName = fullfile(Savesinog, [someFilename,imagetype]);

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by