path

path(dirpath) allows to add directories defined in dirpath into the search path for m-files.
This allows mathlayer to run the m-files available in dirpath.
If there are files with the same name in different folders, the file located in the first folder by ASCII-code order will be taken. path# returns all folders defined in path.

Limitations: path has to be executed on its own (i.e. not within a script)

Examples

> path#

C:\mathlayer\mathlayer-cmd\bin\..\libs\chart\

> cd('C:\Users\admin\Documents')

[ans:C:\Users\admin\Documents]

> path([pwd,'\mfile01'])

[ans:added to path "C:\Users\admin\Documents\mfile01"]

> path([pwd,'\mfile02'])

[ans:added to path "C:\Users\admin\Documents\mfile02"]

> path#

C:\Users\admin\Documents\mfile01
C:\Users\admin\Documents\mfile02
C:\mathlayer\mathlayer-cmd\bin\..\libs\chart\

Resources

See also

cd | mfiles | pwd | rmpath