What is the diffence between end and return in function ?

Antworten (1)

James Tursa
James Tursa am 15 Mär. 2018

1 Stimme

If the "end" you are talking about is the function end, then there is no difference. Both statements will cause a return to the caller and free any currently existing local variables. But of course the "return" statement can appear anywhere in the body of the function.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 15 Mär. 2018

Beantwortet:

am 15 Mär. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by