MATLAB: Syntax of handle: f = @(X)find(X);

function handlehandles

Hi everyone~
I'm learning about use handle. The usual syntax is h = @FuncName
But I also saw an example of f = @(X)find(X)
from here:
Can anyone please explain what the difference is? Can we use f = @find instead?
Thank you~

Best Answer

Yes, you can use
f = @find
instead in this case. For example:
y = zeros(10,1);
y(3:end) = 3:10;
f(y)
The way the example defines it gives you more flexibility in using find() for example
f = @(x)find(x>5)
f(y)