MATLAB 中的 @ 运算符(at 符号)是什么?
我有一些 MATLAB 程序使用 @
(at 符号)作为运算符。这是什么意思?
MATLAB 6.5 支持该运算符吗?
I have some MATLAB programs that use the @
(at sign) as an operator. What does it mean?
Does MATLAB 6.5 support this operator?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
@ 运算符创建一个函数句柄,它允许您像变量一样轻松创建和传递函数调用。它有许多不错的功能,不幸的是您无法使用这些功能。这是因为正如您所怀疑的那样,直到版本 7(紧随您的版本发布之后)才将其引入 matlab。
The @ operator creates a function handle, something that allows you to easily create and pass around a function call like a variable. It has many nice features, none of which are available to you unfortunately. This is because as you suspect, it was not introduced into matlab until version 7, the release immediately after yours.
它用于在Matlab中声明匿名函数。
我认为这些术语是“函数句柄”。
实际上,它涵盖了 Matlab 无法在任何 M 文件中的任何位置声明函数的问题。
您可能会在这里看到它:
您最喜欢的 MATLAB/Octave 编程技巧是什么?
我发现它与“
It used to declare Anonymous Functions in Matlab.
I think the terms is "Function Handle".
Practically it covers the inability of Matlab to declare a function at any place in any M file.
You may see it here:
What is your favourite MATLAB/Octave programming trick?
I found it to be useful in Image Processing along with the "blockproc" command.
文档称它是一个函数句柄。
Documentation says that it's a function handle.