File Exchange

image thumbnail

gettok: a pedestrian matlab constructs decoder

version (66.1 KB) by us
a decoder/tokenizer for MATLAB constructs

1 Download

Updated 25 Apr 2005

View License

recursively decodes MATLAB constructs such as numbers, strings, structures, cells, and returns
- <eval>uable MATLAB constructor syntax
- a descriptive summary of the constructor's contents
- the contents itself

and - for historical reasons
- converts strings to and from cells
- creates character ranges

the convenient GETTOK wrapper STOK creates two panels

the upper panel lists the constructor syntax and contents descriptor of each entry
- selecting line 1 will display a brief help in the lower panel
- selecting line 2 will display a version summary in the lower panel
- selecting an entry displays a summary and the contents of the constructor in the lower panel
- selecting any item in the lower panel displays the constructor syntax in the command window for copy/paste operations
- evaluating a constructor at the command prompt will return its contents

see the accompanying published M-file for an example

Cite As

us (2021). gettok: a pedestrian matlab constructs decoder (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

anas anas


Peter (PB) Bodin

Great functionality and excellent documentation.

MATLAB Release Compatibility
Created with R12.1
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!