How to obtain a warning message?
Show older comments
I would like to extract the warning message, that a function throws. For example
syms x
solve(sin(1/sqrt(x)))
generates the warning:
Warning: The solutions are parametrized by the symbols:
k = Z_
I want to put the message to a variable programmatically. How can I make this? Thanks.
P.s. I know about lastwarn but I need to handle several warnings not just the last one.
Accepted Answer
More Answers (0)
Categories
Find more on Error Handling in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!