poster
2019-12-14, 20:13
假设我已经在Matlab中编写了一个函数fun(a,b,c)并将其保存为.. \ My Documents \ MATLAB \ fun.m。如何使它可用于Matlab中的所有功能。
换句话说:为了从任何其他matlab文件(脚本,函数)调用此函数而又不在文件存储目录中需要做什么?
回答:
我相信您可以通过将文件添加到路径中来实现这种效果-http: //web.cecs.pdx.edu/~gerry/MATLAB/howTo/setMATLABpath.html#pathCommand (http://web.cecs.pdx.edu/~gerry/MATLAB/howTo/setMATLABpath.html#pathCommand)
更多&回答... (https://stackoverflow.com/questions/4865052)
换句话说:为了从任何其他matlab文件(脚本,函数)调用此函数而又不在文件存储目录中需要做什么?
回答:
我相信您可以通过将文件添加到路径中来实现这种效果-http: //web.cecs.pdx.edu/~gerry/MATLAB/howTo/setMATLABpath.html#pathCommand (http://web.cecs.pdx.edu/~gerry/MATLAB/howTo/setMATLABpath.html#pathCommand)
更多&回答... (https://stackoverflow.com/questions/4865052)