필터 지우기
필터 지우기

Is it possible to change PATH temporarily?

조회 수: 4 (최근 30일)
Michael Delafuente
Michael Delafuente 2019년 8월 27일
댓글: Sean de Wolski 2019년 8월 29일
I'd like to be able to change my PATH variable between two different values easily without manually adding and removing paths from the PATH variable for Matlab. I have a usual setup with the PATH variable set to include all the default Matlab paths plus my little repository of custom functions I keep on my computer. I'm readying a project that will distribute some code and I'd like to make sure the scripts and functions I distribute are complete and don't depend on some script that's on my desktop's normal PATH. I created a folder called 'project' and put each of the final edits of the scripts and functions as I make them. It would be nice if I could flip a setting and my PATH changed to only the default Matlab paths plus the 'project' folders without manually removing my normal paths and then revert to my normal paths when I'm not working on the project. That way, if I call a function that I haven't edited and put into place in 'project', it won't run any scripts/functions in my normal PATh and I'll get the appropriate error to alert me that I still need to put that script/function in the 'project' folders.
Is there an easy way to do this without manually editing the PATH variable?

채택된 답변

Sean de Wolski
Sean de Wolski 2019년 8월 27일
You really should look into using actual "Projects" in R2019a. They do exactly what you want.
  댓글 수: 2
the cyclist
the cyclist 2019년 8월 27일
TIL!
Sean de Wolski
Sean de Wolski 2019년 8월 29일
Most exciting 19a feature :)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

the cyclist
the cyclist 2019년 8월 27일
This is not really an answer to your question, but this documentation about identifying program dependencies might also be useful to you.

카테고리

Help CenterFile Exchange에서 Adding custom doc에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by