[英]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.