- Put a try/catch around your code that is throwing the error.
- Use MException.last to retrieve the last error.
hold all warning in command line
2 次查看(过去 30 天)
显示 更早的评论
is there any way i can prevent warning message from showing in the command line? and able to refer back the error msg after execution? im doing this because i dont wan to be interrupted as i want to demo my program
0 个评论
回答(1 个)
Sean de Wolski
2013-11-12
try
[17 1]*[1 2 0]
catch ME
end
Later on...
If you still have ME, you can use it. Else:
ME = MException.last
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Argument Definitions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!