Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the @ operator in MATLAB?

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?

like image 642
Yin Zhu Avatar asked Jan 20 '10 10:01

Yin Zhu


People also ask

What does %% mean in MATLAB?

The MATLAB editor automatically highlights all content after %% comments, and text after %% in the same line are turned bold.

What do operators work on in MATLAB?

Except for some matrix operators, MATLAB arithmetic operators work on corresponding elements of arrays with equal dimensions. For vectors and rectangular arrays, both operands must be the same size unless one is a scalar.

What does @function mean in MATLAB?

It consists of a single MATLAB expression and any number of input and output arguments. You can define an anonymous function right at the MATLAB command line or within a function or script. This way you can create simple functions without having to create a file for them.


2 Answers

Documentation says that it's a function handle.

like image 140
Anton Gogolev Avatar answered Sep 28 '22 04:09

Anton Gogolev


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.

like image 35
Royi Avatar answered Sep 28 '22 05:09

Royi