assert
Environment
Assert that a condition is true. Throws an error if false.
Syntax
assert(condition)
assert(condition, msg)
Examples
assert(x > 0, 'x must be positive')▶ Run
See Also
Try SimLab — Free MATLAB® Alternative
466 functions. Runs in your browser. No install.
Open SimLab