Borrar filtros
Borrar filtros

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

5 visualizaciones (últimos 30 días)
Ram
Ram el 29 de Mzo. de 2013
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.

Respuestas (1)

the cyclist
the cyclist el 29 de Mzo. de 2013
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 comentarios
Ram
Ram el 29 de Mzo. de 2013
Thank you very much for the solution.
the cyclist
the cyclist el 29 de Mzo. de 2013
Please accept the solution to indicate your issue was solved.

Iniciar sesión para comentar.

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by