Change the directory of matlab.
2 views (last 30 days)
Show older comments
Hello, I am having a kinda large project in Matlab, in which i have to simulate different projects in Simulink which will be controlled by a graphical user interface (GUI) that will be implemented through matlab's GUIDE. In order for the GUI to work, the .mdl files created from Simulink have to be opened. Here is my question: If i give my professor the folder containing the files, when he will open the GUI, the directory must be changed to tha folder that he placed them in his PC, i.e. C:\Users\%USERPROFILE%\Desktop\folder1 (assuming the files i gave him are in 'folder1'). This command (to change directory) will be contained in the GUI, so that as soon as it is executed the directory will be changed. My problem is that i can change the directory only to C:\Users\%USERPROFILE%\ through the command "cd(getenv('USERPROFILE'))", which means that all the files will be scattered through his desktop. Can anyone help? Thanks in advance.
1 Comment
dpb
on 1 Mar 2014
If you can't aid your professor in setting up the project on his machine suitably, I'd suggest writing an installation script that puts them in a defined place.
Answers (0)
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!