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