matdoc

comment/document the data when saving it

You are now following this Submission

Usage case:
I usually save the varible data with comment, for later reference. The comment include which code file generates this data variable, when the data is saved, and other additional information I add.
So this function allow you to input the key-value pair to comment, and it will automatically add the time and generating codefile information.

Usage syntax:
S = matdoc(key1,value1,key2,value2,... )
e.g. S=matdoc('winSize','1s')
S will be a struct containing fields: winSize, codefile, time.

Then, you could save your data with S,
e.g. save(pathVar,'data','S');

Cite As

Meng Wang (2026). matdoc (https://nl.mathworks.com/matlabcentral/fileexchange/73714-matdoc), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Scripts in Help Center and MATLAB Answers

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0