How to include a function into the main directory
2 次查看(过去 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 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!