Functions for Path management

조회 수: 2 (최근 30일)
Kah Joon Yong
Kah Joon Yong 2015년 11월 5일
댓글: Kah Joon Yong 2015년 11월 9일
There are quite a number of functions related to path management in MATLAB. For instance: cd, ctfroot, system('set PATH'), mkdir, pwd etc. Which of those can be used in a deployed executabloe and which of those can only work in MATLAB?
My GUI standalone must do the following: make a userpath in My Documents when it is deployed, copy the default template file (Default_Template.xlsx, which i have included when compiling using app compiler) to the userpath, make a new directory in the userpath, save and load state to and from the userpath, save files to the new directory in the userpath. Which command I should use?
Thank you in advance.

채택된 답변

Sudhanshu Bhatt
Sudhanshu Bhatt 2015년 11월 9일
Hi Kah Joon Yong,
In general, a compiled application should avoid MATLAB commands that directly access or modify MATLAB's internal paths, i.e. the MATLAB path and the MATLAB Java class path. These functions are: ADDPATH, CD, JAVAADDPATH, JAVACLASSPATH, JAVARMPATH, PATH, RMPATH, SAVEPATH.
To learn more about Path Management in Deployed Applications, please refer to the following article:
Hope this helps!
Thanks
Sudhanshu Bhatt
  댓글 수: 1
Kah Joon Yong
Kah Joon Yong 2015년 11월 9일
Thank you. I have read this article before I wrote here. I was afraid that those descriptions were too general and could only cover so many examples. Therefore I would like to clarify it specifically.
Anyway, according to your explaination, it is safe to use the USERPATH and CTFROOT commands. Am I right?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by