Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
hasan alhussaini
hasan alhussaini 2017 年 9 月 15 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Adam
Adam 2017 年 9 月 15 日
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 2017 年 9 月 15 日
編集済み: Stephen23 2017 年 9 月 15 日
fullfile does not magically append the file extension, this has to be done independently of fullfile:
FileName = fullfile(Savesinog, [someFilename,imagetype]);

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by