WITH.m

Version 1.1.0.0 (1.98 KB) by Ben C.
Adds a function to MATLAB that acts similarly to how WITH does in Excel VBA
3 Downloads
Updated 18 Mar 2023

WITH.m

Adds a function to MATLAB that acts similarly to how WITH does in Excel VBA

Takes an object or struct along with a cell of pseudo name-value pairs as arguments and sets the fields/properties according to the name-value pair.

Example:

propset = {'YLabel.String','Temperature', 'XLim', [0 inf]};
WITH(fig, propset)

is equivalent to

fig.YLabel.String = 'Temperature'; 
fig.XLim = [0 inf];

View WITH.m on File Exchange

Cite As

Ben C. (2024). WITH.m (https://github.com/ben-cha/WITH.m/releases/tag/1.1), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with R2017b and later releases
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
1.1.0.0

See release notes for this release on GitHub: https://github.com/ben-cha/WITH.m/releases/tag/1.1

1.0

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.