What is the benefit of using a function handle?
Mostra commenti meno recenti
y = @(x) x; vs y=x... why would I use one over the other? Any benefit to the function handle?
Risposta accettata
Più risposte (2)
Zoltán Csáti
il 24 Gen 2015
The two statements are not the same. The first one defines a function while the second one is an equality. The two identical forms are
y = @(x) x;
and
function y = some_function(x)
y = x;
end
Kai
il 24 Gen 2015
0 voti
The function handle is for example helpful for integration. Maybe you can have a look at fplot, which makes use of function handles.
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!