I am using Octave on Window vista. I am using 4 package in my code. But every time I restart octave, I have to load manually from command line, 'pkg load ...' Is there a way to load them permanently so that whenever Octave is started it finds them in its path.
相关问题
- Grails External Configuration. Can't access to
- PHP Zend Framework - Zend_Config and global state
- JavaScript Show loading gif while Iframe loads
- Octave 4.2.2 and sympy 1.6
- setting multiple fields at once / add new field to
相关文章
- Where in Django can I run startup code that requir
- Repackaging .jar-s in Android .aar library
- Why can't sub-packages see package private cla
- Loading custom config file into a Codeigniter libr
- Package.getPackage in java returning null
- How does one easily add posix support to PHP using
- How to manage the Blank White Loading screen of an
- R install Vennerable package on windows [duplicate
Install the packages on your working directory. Then add "pkg load pkg_name" command to octave-1.1~\share\octave\site\m\startup\octaverc. It will load the package every time.
When Octave starts, it runs
~/.octaverc
. If you want Octave to automatically load a package, simply add apkg load pkg-name
command to it. If the files does not exist, create it.If you do this, remember that other people may not have Octave configured to load packages at startup. Therefore, if you write code for others, remember that your programs still need to load the packages they require.
Do not use
pkg install -auto ...
orpkg rebuild -auto ..
because that will stop working on the next Octave release.I got the answer. It can be set at the time of package installation. install with following command pkg install -auto [package name] It will be load every time octave is started.
create a file named "startup.m" with this content:
in the directories "octave-home/share/octave/version/m/startup/octaverc" and "octave-home/share/octave/site/m/startup/octaverc". (https://www.gnu.org/software/octave/doc/v4.2.1/Startup-Files.html) So it loads all packages at startup.