필터 지우기
필터 지우기

How to run .m file automatically without path?

조회 수: 1 (최근 30일)
Veronika
Veronika 2017년 3월 9일
댓글: Guillaume 2017년 3월 13일
Dear all,
I have .m file for starting up program. I always have to put (write) the path this .m file. For example: run C:/Program Files/.../file.m. I would like to automatized this action for any PC, without using file path. Is this possible in Matlab?
Thank you for your answers.

채택된 답변

Guillaume
Guillaume 2017년 3월 9일
If you don't specify the path to the file, it will have to be in one of the folders on the matlab search path for it to be found. See this page for the folders that are in the search path.
  댓글 수: 4
Veronika
Veronika 2017년 3월 10일
Okay, but will it works on other computers, where the program eidors has a different path?
Guillaume
Guillaume 2017년 3월 13일
Well, it all depends how you get that program onto other computers. If you use an installer, then either that installer needs to add the folder where it's put to the matlab path, or it needs to put the file(s) in a folder already on the matlab path.
If you copy the program manually, then it's up to you to do the same.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by