Using costant value to Anonymous function
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I write an anonymous function calling back a costant value?
0 Kommentare
Antworten (1)
Sahithi Kanumarlapudi
am 30 Okt. 2019
Assuming by ‘calling back a constant value’ you mean that the anonymous function returns a constant value the following code is an example
s = @(x) 5; % anonymous function
Now if you run
a(23)
Output is
5
Hope this helps!
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!