How do I make a new folder and then name it using the string stored within a variable.
Mostrar comentarios más antiguos
I have named a variable s2. The string stored within s2 is '3 min RT'.
I want to create a new folder named "3 min RT".
At the moment when I use mkdir s2, the folder created is called s2 and not "3 min RT".
Anyhelp please? Thanks!
Respuestas (2)
Alex Mcaulley
el 22 de Jul. de 2019
Editada: Alex Mcaulley
el 22 de Jul. de 2019
Use:
mkdir(s2)
Nicholas Byres
el 22 de Jul. de 2019
0 votos
1 comentario
"I had to use:"
mkdir([s2])
"including both the square and curly brackets."
There are no curly braces in your code.
The parentheses are either indexing or calling a function:
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!