使用函数error('message_id', 'message'),出现错误时函数中止运行。 参考http://www.ilovematlab.cn/thread-43261-1-1.html 转载于:https://www.cnblogs.com/Dzhouqi/p/3428279.html