I am doing a project in that i have to open the folder using Matlab code.
how can I open the folder from desktop using matlab code?
Direct link to this comment:
It depends on what "open" and "the folder from desktop" exactly means here. Both terms could mean a variety of different things, so please add more information by appending it to the original question by editing. I've seen too many important information hidden in comments or pseudo-answers, where the readers do not expect it.
No products are associated with this question.
Direct link to this answer:
You get the users directory in Windows with
[~, userdir] = system('echo %USERPROFILE%')
The desktop folder is in this folder.
If you're using windows, you can do
where folderName is a string, for example 'D:\MyData'. It will bring up Windows Explorer open to the folder that you specified.
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
New to MATLAB?
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
See all countries