简体   繁体   English

尝试调用 function 时 Octave 中的错误:第 1 行第 1 列附近未定义

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

相关问题 我的八度代码 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 为什么在 DeepFace 中尝试加载 stream 时会出现 (JSONDecodeError: Expecting value: line 1 column 1 (char 0))? - why does a (JSONDecodeError: Expecting value: line 1 column 1 (char 0)) occur while trying to load stream in DeepFace? Octave中fminunc的输出函数 - Output function for fminunc in Octave 成本函数,线性回归,试图避免硬编码 theta。 八度。 - Cost Function, Linear Regression, trying to avoid hard coding theta. Octave. 当数据集具有具有唯一值的特征列时,尝试在DSX中构建模型时出现评估错误 - Evaluation error while trying to build model in DSX when dataset has a feature column with unique values 尝试绘制 KNN 的决策边界时出错 - Error while trying to graph a decision boundary for a KNN 尝试使用MOTChallenge devkit时出错 - Error while trying to use MOTChallenge devkit 尝试从 Twitter 提取推文时出错 - Error while trying to extract tweets from twitter 尝试适应 GridSearchCV 时出错 - Getting error while trying to fit to GridSearchCV 错误:***“undefined.cases”的第 1 行:属性的 ... 值错误 - Error: *** line 1 of `undefined.cases': bad value of ... for attribute
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM