How can i take an error without using try catch ?
1 view (last 30 days)
Show older comments
Hi, My condition is something like this (()) +4 If parenthese is empty, code should give an error not only four parenthesis but also infinitive parenthesis String can use for determining error. Also parenthesis take an input with numbers.
3 Comments
Adam
on 3 May 2016
If you are asking what your question title says then:
error( ... )
throws an error and
assert( condition, ... )
asserts that a condition is true and throws an error if it isn't. The body of your question seems to concern other matters that are potentially vastly more complicated though and seem to be effectively trying to write your own parser.
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!