structobj

Wrapper for the built-in MATLAB struct data structure
57 Downloads
Updated 13 Apr 2017

This is a class that simply wraps the functionality of the built-in struct datatype, but adds a number of useful features. The most notable feature, is that a structobj is a handle class and is therefore passed by reference to other functions. This allows you to essentially modify the structure in-place.
Instances of this class behave so similarly to the built-in datatype that they can often be fed as inputs to functions that expect structures as inputs.
Additional functionality:
* "Updated" event for when underlying data is changed
* Conversion back to standard structs
* Easily merge structobj instances or structures
* Compatibility with all standard struct functionality (isfield, setfield, getfield, dynamic fieldnames, concatenation, orderfields, fieldnames, tab completion, etc.)

Cite As

Jonathan Suever (2024). structobj (https://github.com/suever/structobj), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Structures in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.0.0.0

Fixes small bug in getfield
Changed project name

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.