Matlab function holding first value?

1 visualizzazione (ultimi 30 giorni)
Péter Király
Péter Király il 18 Nov 2016
Risposto: Mischa Kim il 18 Nov 2016
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?

Risposte (1)

Mischa Kim
Mischa Kim il 18 Nov 2016
Hi Péter, this is explained well in the documentation here.

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by