Borrar filtros
Borrar filtros

How can I specify a folder path using input?

3 visualizaciones (últimos 30 días)
Camilla
Camilla el 21 de Jun. de 2013
Hi all. I want to input which folder the script should access at the end of the filepath. As in, user would input ie "FV01" folder which is a subfolder of DropJump, and the script would go to FV01, or whatever is inputted, and then performs the calculations I have already written.
I have the filepath already:
% in_path='C:\Users\3830malowac\Desktop\DropJump\';
ID=input('ID #: ','s');
end
what I want to happen is...
% in_path='C:\Users\3830malowac\Desktop\DropJump\ID\';
end
but I know this is not correct. What can I write to have this outcome? I have a feeling I need to use dir. Thanks.

Respuesta aceptada

Nitin
Nitin el 21 de Jun. de 2013
ID = [in_path,'\',ID]; cd(ID)

Más respuestas (0)

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