How to call a defined function when any error occur instead of termination?

3 vues (au cours des 30 derniers jours)
Gaurav Gupta
Gaurav Gupta le 12 Mar 2013
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

Réponses (1)

Wayne King
Wayne King le 12 Mar 2013
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.

Catégories

En savoir plus sur Scope Variables and Generate Names dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by