Matlab function holding first value?

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?

回答 (1 件)

Mischa Kim
Mischa Kim 2016 年 11 月 18 日

1 投票

Hi Péter, this is explained well in the documentation here.

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

製品

質問済み:

2016 年 11 月 18 日

回答済み:

2016 年 11 月 18 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by