Inject error in function

版本 1.0.1 (1.5 KB) 作者: tommsch
This function injects an error in an m-file at a line. Can be used to abort a function.
3.0 次下载
更新时间 2020/11/24

查看许可证

This function (most likely) generates an error at an arbitrary line in a function. The taken approach may be used to solve the long-standing problem of breaking out of a function using a callback, without the need to modify the function in question.
It does this by quite brutal means: Namely, it injects ( via the use of dbstop ) at every line the command `clear all`.

引用格式

tommsch (2024). Inject error in function (https://www.mathworks.com/matlabcentral/fileexchange/83283-inject-error-in-function), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2018a
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

参考作品: tracer4m

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.1

Changed summary description

1.0.0