verbatim: Get the text of a block comment.

Verbatim returns the text contained in the next block comment.


Updated Sun, 22 Mar 2009 23:26:26 +0000

View License

Have you ever wanted to include a block of text in your m-file without having to worry about quotes ('), end-of-line characters (\n) and other formatting issues? Verbatim will return exactly the text contained in the block comment following the call to verbatim. Example:

str = verbatim;
This is the text
that will be returned by verbatim.

Cite As

Douglas Schwarz (2023). verbatim: Get the text of a block comment. (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Updated for R2009a and added automatic removal of indentation.