Making functions available in another folder

I have a folder, X , with several functions that I want to use exclusively in another folder, Y, which is not a child of X. IS there a command that I could use to add the path containing the functions in folder Y available to folder X and all it's children exclusively?
So far, I tried addpath "C:\Users...X", but it makes the functions available everywhere.

답변 (1개)

Image Analyst
Image Analyst 2014년 8월 11일

0 개 추천

You did it correctly. If you have a function, say sub1, and you want only functions in Y to see it but not code in any other folder, you should have the function names in X be unique so that functions in those other folders do not call functions with the same names as those in folders X and Y.

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

질문:

Jpj
2014년 8월 11일

답변:

2014년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by