【问题标题】:Octave packages unload themselvesOctave 包自行卸载
【发布时间】:2017-11-13 19:01:19
【问题描述】:

我正在使用 Octave io 包,但在我运行脚本之前它会一直自行卸载。我正在使用io 提供的xlsread 函数,但我不断收到以下错误:

warning: Functions for spreadsheet style I/O (.xls .xlsx .sxc .ods .dbf .wk1 etc.) are 
provided in the io package. See <http://octave.sf.net/io/>. 
Please read <http://www.octave.org/missing.html> to learn how you can contribute missing 
functionality. 
error: 'xlsread' undefined near line 25 column 23

当我输入pkg list 时会显示该包,当我输入pkg load io 时它旁边有一个星号。我什至编辑了octaverc 以在启动时加载io。但是当我运行我的脚本以及在我的脚本失败后检查pkg list 时,我得到了那个错误,包被卸载了。

【问题讨论】:

  • 您的脚本开头是否有类似clear all 的内容?假设脚本中的某个命令清除了加载的包,您应该尝试以下操作:在脚本中,在调用使用它的函数之前导入包 - 看看它是否有帮助。
  • 是的,就是这样。谢谢!
  • 不客气!我发布了上述解决方案作为答案。

标签: import package octave undefined-function


【解决方案1】:

确保不要在脚本中的某处调用 clear all(或类似命令),因为这也可能会从内存中删除加载的库。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-11-22
    • 1970-01-01
    • 2017-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多