automatically add path in a MATLAB script

前端 未结 3 1022
生来不讨喜
生来不讨喜 2021-01-02 11:01

I have several MATLAB scripts to share with my colleagues. I have put these scripts under a specified directory, e.g., /home/sharefiles

Under the MATLAB command prom

3条回答
  •  佛祖请我去吃肉
    2021-01-02 11:43

    So when you Use the GUI to set path, the paths get added in the default start directory of Matlab in the pathdef.m file present there. Hence if you are running your code from any other directory either you would have to copy over this file or create a script in the startup folder. Hope this helps!!

提交回复
热议问题