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!