开发者

octave: load many functions from single file

How can I put multiple functi开发者_JS百科ons in one file and later get access to all of them in the octave interpreter ? I don't want to have a thousand files and want to group functions together. I'd like something like 'import' in python.


Once you have saved all your function definitions in a single script file, use source("filename") to have access to these functions within the interpreter.


What you're looking for is called “script files”, defined there: http://www.gnu.org/software/octave/doc/interpreter/Script-Files.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜