how to automatically load user-defined functions in mathematica

最后都变了- 提交于 2019-12-03 03:57:54

You can create a package in $UserBaseDirectory/Autoload. This will be loaded at Kernel initialization time.

Your package should have a Kernel/init.m file

MyPackage/Kernel/init.m

Reference documentation on Mathematica packages: http://reference.wolfram.com/mathematica/tutorial/SettingUpMathematicaPackages.html

DeclarePackage[] is a lazy loading mechanism for symbols and their definitions. The associated package is loaded only when the symbol is used:

http://reference.wolfram.com/mathematica/ref/DeclarePackage.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!