【发布时间】:2012-08-23 01:11:42
【问题描述】:
我注意到我无法将 --traditional 选项与另一个字母组合在一起,例如 -i。
例如,当我将其作为 octave .m 文件的第一行时
#!/usr/bin/octave --traditional
然后它工作。 Octave 启动正常并运行脚本。
但是当我尝试时
#!/usr/bin/octave --traditional --silent --norc --interactive
它不起作用。八度误差。不理解选项。
当我尝试时
#!/usr/bin/octave --traditional -qfi
也是错误。但是这个
#!/usr/bin/octave -qfi
有效。
问题是--traditional 没有像所有其他选项一样的单字母快捷方式。这是我看到的选项
Options:
--debug, -d Enter parser debugging mode.
--doc-cache-file FILE Use doc cache file FILE.
--echo-commands, -x Echo commands as they are executed.
--eval CODE Evaluate CODE. Exit when done unless --persist.
--exec-path PATH Set path for executing subprograms.
--help, -h, -? Print short help message and exit.
--image-path PATH Add PATH to head of image search path.
--info-file FILE Use top-level info file FILE.
--info-program PROGRAM Use PROGRAM for reading info files.
--interactive, -i Force interactive behavior.
--line-editing Force readline use for command-line editing.
--no-history, -H Don't save commands to the history list
--no-init-file Don't read the ~/.octaverc or .octaverc files.
--no-init-path Don't initialize function search path.
--no-line-editing Don't use readline for command-line editing.
--no-site-file Don't read the site-wide octaverc file.
--no-window-system Disable window system, including graphics.
--norc, -f Don't read any initialization files.
--path PATH, -p PATH Add PATH to head of function search path.
--persist Go interactive after --eval or reading from FILE.
--silent, -q Don't print message at startup.
--traditional Set variables for closer MATLAB compatibility.
--verbose, -V Enable verbose output in some cases.
--version, -v Print version number and exit.
我主要对运行与 Matlab 兼容的 octave 代码感兴趣,所以我想使用这个 --traditional 选项来确保我的代码与 Matlab 兼容,以防我需要在 Matlab 中运行相同的代码也是。
或者,一旦 octave 开始使用不同的命令,我是否可以“打开”这种兼容模式?
我在 Linux 上使用 GNU Octave,版本 3.2.4。
谢谢
【问题讨论】:
标签: octave