What is the diffence between end and return in function ?
13 ビュー (過去 30 日間)
古いコメントを表示
What is the main differences between (end) and (return) (function) in MATLAB ?
0 件のコメント
回答 (1 件)
James Tursa
2018 年 3 月 15 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!