Matlab function holding first value?
Show older comments
Hello everyone!
a=2;
b=3;
f=@(x) a*x+b;
f(1)=5
if I set
b=0;
f(1)=5
Why is this?
Answers (1)
Mischa Kim
on 18 Nov 2016
1 vote
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!