简体   繁体   English

错误:“ spdiag”在行附近未定义

[英]error: 'spdiag' undefined near line

I am introducing into Octave programming and I am interested in defining an sparse matrix as here , so I have the following code: 我正在介绍Octave编程,并且对在这里定义稀疏矩阵感兴趣,因此我有以下代码:

  spdiag ([1, 2, 3], 1)

And I got the error "error: 'spdiag' undefined near line 1 column 1" 我得到了错误“错误:'spdiag'在第1行第1列附近未定义”

I understand that for some reason the Octave build-in function spdiag cannot be found but I do not understand whether I have to include some Octave module and/or set some environmental variable in order to make it work. 我了解由于某种原因无法找到Octave内置函数spdiag,但我不明白是否必须包含某些Octave模块和/或设置一些环境变量才能使其正常工作。

I would really appreciate some help. 我真的很感谢您的帮助。

By the way I am working under Ubuntu 13.10 and the octave version is 3.6.4. 顺便说一下,我在Ubuntu 13.10下工作,八度版本为3.6.4。

The manual you are reading for a very very old version of Octave. 您正在阅读的手册非常老版本的Octave。 If you go to the main page , you'll notice this is the manual for version 3.0.2 and released in August 2008. The function spdiag was deprecated in version 3.2.0 and removed in 3.6.0. 如果转到主页 ,您会注意到这是版本3.0.2的手册,该手册于2008年8月发布。函数spdiag在版本3.2.0中已弃用,在版本3.6.0中已删除。

If you use the Octave website, you will always get the latest version of the manual. 如果您使用Octave网站,则将始终获得该手册的最新版本 In addition, the manual in both html and pdf forms is part of the Octave installation. 此外,html和pdf形式的手册都是Octave安装的一部分。 Since you are using Ubuntu, you can install the package octave-doc to get the manual for the same version you have installed. 由于使用的是Ubuntu,因此可以安装octave-doc软件包来获取与已安装版本相同的手册。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 第1列第1行附近的八度音阶错误未定义 - octave error undefined near line 1 column 1 八度错误:第 1 行第 21 列附近未定义 - Octave error: undefined near line 1 column 21 尝试调用 function 时 Octave 中的错误:第 1 行第 1 列附近未定义 - Error in Octave while trying to call function: Undefined near line 1 column 1 在行 x 列 y 附近未定义八度音程错误文件名 - Octave error filename undefined near line x column y 错误:'y' 在第 8 行第 12 列附近未定义错误:从第 8 行第 3 列的计算成本调用 - error: 'y' undefined near line 8 column 12 error: called from computeCost at line 8 column 3 运行 Octave 函数 - 在第 1 行第 5 列附近未定义 - Running Octave function - undefined near line 1 column 5 ubuntu中的八度:'rm'在第1行第1列附近未定义 - octave in ubuntu: 'rm' undefined near line 1 column 1 错误:运行 Octave 时在第 62 行第 15 列附近未定义“python_ipc_popen2” - error: 'python_ipc_popen2' undefined near line 62 column 15 When running Octave 我的八度代码 function 返回“错误:'num_iters' undefined near line 1 column 37”-Andrew Nguyen coursera 机器学习课程 - My octave code function returns “error: 'num_iters' undefined near line 1 column 37”- Andrew Nguyen coursera machine learning course 在MATLAB / Octave中交替使用spsolve和spdiag - alternate of spsolve and spdiag in matlab/octave
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM