输入未定义(八度)

发布于 2025-01-27 00:25:58 字数 345 浏览 2 评论 0原文

我有以下用新脚本编写的代码形式:

function f1=f1(X,Y)
  A=f2(X,Y)
end

其中f2以另一个脚本写入。我分配了X和Y的向量,都可以使用f2正常工作。但是,当我为新脚本编写它时,控制台显示

'x'在第3行附近未定义,第3列

第3行是输入X首次出现在f2(x,y)中。当我将f2重写时,问题不会出现。问题也没有出现。

我似乎找不到问题,我想知道我在哪里出了问题。提前致谢。

I have the following form of code written in a new script:

function f1=f1(X,Y)
  A=f2(X,Y)
end

where f2 is written in another script. I assigned vectors for both X and Y, both working with f2 just fine. But when I write it for the new script, the console displays

'X' undefined near line 3, column 3

Line 3 is the first time the input X appears in f2(X,Y). The problem doesn't appear when I rewrite f2 right into this script. The problem also doesn't appear for Y.

I can't seem to find the problem and I want to know where I went wrong. Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文