필터 지우기
필터 지우기

Create a directory, CD to the new dir and imwrite to it

조회 수: 5 (최근 30일)
Ram
Ram 2013년 3월 29일
I would like to create a new dir, and imwrite to it. here is what I have:
newdir=mkdir('c:\results', date) % this creates a folder c:\results and subfolder with today's date.
cd (newdir) % this returns an error since string is expected.
imwrite to this folder % imwrite to c:\results\date.
thanks for inputs.

답변 (1개)

the cyclist
the cyclist 2013년 3월 29일
In your syntax, newdir is a logical variable that indicates the status of whether the directory creation was successful. It is not the name of the directory.
Looks like you want
cd(['c:\results\',date])
instead.
  댓글 수: 2
Ram
Ram 2013년 3월 29일
Thank you very much for the solution.
the cyclist
the cyclist 2013년 3월 29일
Please accept the solution to indicate your issue was solved.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by