invoerr

版本 1.0.0.0 (2.2 KB) 作者: Adam Leadbetter
Improved invocation error reporting for Matlab functions
281.0 次下载
更新时间 2010/10/12

查看许可证

At the Matlab Conference, 2010 in London, Joe Hicklin commented that he was interested in seeing improved invocation error reporting in Matlab functions, so here's my stab at providing some of that ability.

The function takes:
- a string of the calling function's name
- an integer of which argument the error is in
- cell arrays of strings with pairs of argument name and argument types

e.g. invoerr('foo',2,{'bar','int'},{'baz','str'})

creates an error report thus:

Error in function foo at argument 2 (baz):

foo(bar,baz)

e.g. foo(1,'a character string')

引用格式

Adam Leadbetter (2024). invoerr (https://www.mathworks.com/matlabcentral/fileexchange/29007-invoerr), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

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