Intermediate calculation in function handle
显示 更早的评论
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
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!