Anonymous Function in MatLab

 Anonymous Function in MatLab

[introduction]

What is Anonymous Function?
It is a function without name.
But it is not store in program file.

How to create an Anonymous Function?
@

[syntax]

@funcName content


e.g.
f=@power2(x) x*x

f(x)=power2(x)
f(5) will return 5*5


more details on:

Comments

Popular posts from this blog

diagonal matrix--diag

a convenient type to record lots of value in MatLab -- cell matrix