Filter löschen
Filter löschen

Can anybody explain such a function handle in Matlab?

1 Ansicht (letzte 30 Tage)
mike cool
mike cool am 25 Okt. 2015
Bearbeitet: Stephen23 am 22 Aug. 2023
@(z)func_example(x,y,z)
Can anybody kindly explain the above function handle in Matlab? I am only familiar with
@func_example
which does not have the variables in the brackets. Thanks in advance!

Akzeptierte Antwort

Stephen23
Stephen23 am 25 Okt. 2015
Bearbeitet: Stephen23 am 22 Aug. 2023
See:
which explains what you have given in your question:
@(z) % defines an anonymous function,
func_example % which calls this function
(x,y,z) % with these arguments
Note that x and y must exist in the workspace where this anonymous function is created, while the z is passed as a variable to the anonymous function when it is called.

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by