How to include a function into the main directory

1 Ansicht (letzte 30 Tage)
Daniel Jaló
Daniel Jaló am 31 Okt. 2012
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.

Akzeptierte Antwort

Kye Taylor
Kye Taylor am 31 Okt. 2012
You can add the directory containging your function to the MATLAB search path. Try
doc pathtool

Weitere Antworten (0)

Kategorien

Mehr zu Search Path finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by