Borrar filtros
Borrar filtros

Generic Change of Directory

1 visualización (últimos 30 días)
Steve
Steve el 10 de Jul. de 2013
If I want to use the change directory command to navigate to the user's desktop without calling out that users name, how do I specify that?

Respuestas (1)

Chad Gilbert
Chad Gilbert el 10 de Jul. de 2013
To cover most cases, you could do:
cd ~/Desktop
if you're running linux or Mac, Or:
[a,b] = system('echo %UserProfile%\Desktop')
cd(b)
on windows. I'm on a linux machine, so I haven't tested the windows solution. You may need to tweak it. If your machine is set up in some non-standard way, or you're using some other OS, then this may not apply.

Categorías

Más información sobre Programming Utilities 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