Intermediate calculation in function handle
Afficher commentaires plus anciens
Hi
I would like to know if it is possible to make intermediate calculation in a function handle.
For example, making something like this functional :
@(x) y=1+1; x+y;
This function handle would return me 3 for example for x=1. y is thus an intermediate variable of a calculation inside the function handle.
Is there a way to do it ?
Thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!