How to call a defined function when any error occur instead of termination?
2 次查看(过去 30 天)
显示 更早的评论
How can I call a defined function when some error occur while executing a script or functions instead of termination by matlab. I need this because I want to save variables which are generated before error occured. Any Help
0 个评论
回答(1 个)
Wayne King
2013-3-12
Why don't you use the debugging tools and set breakpoints. If it occurs in a function, you can use assignin() to create variables that persist in the workspace after you exit the debugger.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Debugging and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!