What is the @ operator in MATLAB?

前端 未结 3 1508
遇见更好的自我
遇见更好的自我 2020-11-28 13:32

I\'ve only used MATLAB 6.5 before. I got some programs that is using \'@\'. Can someone tell me what is it?

By the way, does MATLAB 6.5 support this operator?

相关标签:
3条回答
  • 2020-11-28 14:12

    Documentation says that it's a function handle.

    0 讨论(0)
  • 2020-11-28 14:29

    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.

    0 讨论(0)
  • 2020-11-28 14:33

    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.

    0 讨论(0)
提交回复
热议问题