How to include a function into the main directory
조회 수: 1 (최근 30일)
이전 댓글 표시
I've created some functions that I use often. I'm wondering if there's any way to make it so that the functions work even if they're not in the current directory. Basically it would work such as if it was one of the default functions (rand(n)).
Any help will be highly appreciated. Thanks in advance.
댓글 수: 0
채택된 답변
Kye Taylor
2012년 10월 31일
You can add the directory containging your function to the MATLAB search path. Try
doc pathtool
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!