如何在Octave中更改工具包? [英] How to change toolkit in Octave?

查看:173
本文介绍了如何在Octave中更改工具包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行plot命令时,八度崩溃.我在阿萨德·易卜拉欣的答案中找到了解决方案.他提到将默认工具箱切换为gnuplot,如果我想永久进行更改,请在octave.rc文件中进行更改,但我不清楚octaverc中的永久更改.当我用记事本++打开octaverc时,它看起来像这样:

My Octave crashes when I execute plot command. I found a solution in Assad Ebrahim's answer. He mentioned to switch the default toolkit to gnuplot, and change it in octave.rc file if I want to make the change permanently but I'm not clear about the permanent change in octaverc. When I open my octaverc with notepad++, it looks like this:

## System-wide startup file for Octave.
##
## This file should contain any commands that should be executed each
## time Octave starts for every user at this site.
EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'notepad++'), pathsep, 
EXEC_PATH));
EXEC_PATH (cstrcat (fullfile (OCTAVE_HOME, 'bin'), pathsep, EXEC_PATH));
EDITOR (fullfile (OCTAVE_HOME, 'notepad++', 'notepad++.exe'));

我应该更改什么以及如何更改?

What should I change and how?

推荐答案

首先,问题的直接答案是将要在启动时执行的任何命令附加到.oc​​taverc文件的末尾.因此,要设置特定的图形工具包,您需要添加以下行:

First, the direct answer to your question is to append any command you want executed on startup to the end of the .octaverc file. So, to set a particular graphics toolkit you would add the line:

graphics_toolkit("gnuplot")

graphics_toolkit("qt")

graphics_toolkit("fltk")

针对所需的任何工具包.

For whichever toolkit you want.

现在,正如@Andy指出的那样,如果您使用的是Windows,则可能是您误解了崩溃的长时间延迟.仍未完全解决的Windows错误涉及以下事实:在第一个绘图上,Windows可能需要创建字体缓存文件.这可能需要很长时间.一旦完成,大多数后续绘图将更快.在以下错误报告页面上可以找到一些有关它的信息: https://savannah.gnu.org/bugs/?45458

Now, as pointed out by @Andy, if you are using Windows, it may be that you are misinterpreting a long delay for a crash. A still not entirely resolved windows bug concerns the fact that on the first plot Windows might need to create a font cache file. This can take a long time. Once this is complete, most subsequent plots will be much faster. Some info can be found about it at the following bug report page: https://savannah.gnu.org/bugs/?45458

自发布此答案以来,上面链接的错误已得到很大程度上解决.现在,安装过程的一部分将更新字体缓存文件.如果使用zip软件包而不是可执行安装程序,则应在提取八度后执行一个批处理文件,以确保完成此操作.有关详细信息,请访问: http://wiki.octave.org/Octave_for_Microsoft_Windows

in the time since this answer was posted, the bug linked above has been largely resolved. Part of the installation process now updates the font-cache file. If using a zip package rather than an executable installer, there is a batch file that should be run after extracting octave to ensure that this is done. Details are available at: http://wiki.octave.org/Octave_for_Microsoft_Windows

这篇关于如何在Octave中更改工具包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆