- `[MSG, ID] = lastwarn ()`
- `lastwarn (MSG)`
- `lastwarn (MSG, ID)`
- `lastwarn ("")`

Query or set the last warning message and warning identifier.

Calling `lastwarn ("")` clears the stored warning message.

See also: `warning`, `lasterror`.

### References

- https://www.mathworks.com/help/matlab/ref/lastwarn.html
- https://octave.sourceforge.io/octave/function/lastwarn.html
