when i am running a gui program a window is coming ask me for change the directry
Show older comments
i have write a program in matlab gui. when i run the program a window is coming asking for change the directory. i want that this window never comes. how can i solve the problem? please help me. thank you in advance.
Accepted Answer
More Answers (1)
Image Analyst
on 15 Jul 2011
I've been asking the Mathworks for that for a long time, where if you click on a text file at the bottom of the editor, it automatically changes the current folder to the folder where that file lives. Apparently they don't want to do that for some reason, not even as a user-selectable preference which I pleaded for. So we're stuck with the "Change Folder" "Add to Path" "Cancel" "Help" question when you try to run that file.
I think you can add these lines to your startup.m file so that all your folders and subfolders are already on your path.
addpath(genpath('c:\yourTopLevelFolder'));
savepath
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!