[英]Error in Octave while trying to call function: Undefined near line 1 column 1
When I am trying to call a function it gives me an error.当我尝试调用 function 时,它给了我一个错误。 However, I checked my destination path which is correct where my ".m" file is save.
但是,我检查了保存“.m”文件的正确目标路径。 Destination path: C:\Users\Soumaditya\Desktop\ML File name: warmUpExercise enter image description here
目标路径:C:\Users\Soumaditya\Desktop\ML 文件名:warmUpExercise在此处输入图像描述
You are probably mistyping something.你可能打错了什么。
At the matlab or octave terminal, from the directory where you expect your.m file to be, type the command what
.在 matlab 或 octave 终端上,从您期望 your.m 文件所在的目录中,键入命令
what
。
This will show you what is actually there which is relevant to matlab / octave.这将向您展示与 matlab / 八度音程相关的实际情况。
Another possibility is that you named your function file one thing, but the name of the function inside the file has named it something else (though, in this case, octave at least would probably have thrown a warning...)另一种可能性是您将 function 文件命名为一件事,但文件中 function 的名称已将其命名为另一件事(尽管在这种情况下,八度音程至少可能会引发警告......)
Also make sure that your filename doesn't actually have any weird spaces in the name.还要确保您的文件名名称中实际上没有任何奇怪的空格。 A file
'myfunction.m '
is not the same as 'myfunction.m'
or ' myfunction.m'
文件
'myfunction.m '
与'myfunction.m'
或' myfunction.m'
You will need to move all the scripts to the default directory for Octave files on your system, move to your home directory on the Ubuntu system.您需要将所有脚本移至系统上 Octave 文件的默认目录,移至 Ubuntu 系统上的主目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.