Pack & Unpack variables to & from structures with enhanced functionality

v2struct packs and unpacks variables to and from structures with enhanced functionality.

Download
Download

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Adi Navve (2026). Pack & Unpack variables to & from structures with enhanced functionality (https://nl.mathworks.com/matlabcentral/fileexchange/31532-pack-unpack-variables-to-from-structures-with-enhanced-functionality), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Communities
Version Published Release Notes Action
1.14.0

Made submission availavble as a toolbox

Download
1.13.0

Added easy packing of all variables in caller workspace (thanks to Vesa Lehtinen for the suggestion), fixed bug in warning handling in packing case, edited comments.

Download
1.11.0

Clarified warning and error when packing/unpacking with fieldNames.

Download
1.8.0

fixed bug in packing with variables only

Download
1.7.0

fieldNames usage corrected, now for triggering a specific string must be included. Documentation enhanced. Code tweaked.

Download
1.5.0

* Added functionality: avoid overwritring existing variables
* Added 'unpacking' examples to demo1 .m file.

Download
1.4.0

added update structure functionality, made some documentation and demo function changes, added image :)

Download
1.0.0

Download