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
4 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. (2026). 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
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.