Unfold Named Parameter Struct

版本 1.0.1 (2.5 KB) 作者: Bernard Beitz
Use this helper function if you want to call a function multiple times but each time with different values of named parameter.
5.0 次下载
更新时间 2022/4/14

View Unfold Named Parameter Struct on File Exchange

Generate multiple named parameter combinations from a single struct that contains arrays.

Example:

my_struct.LineWidth = 0.5:0.5:2;
out = unfold_named_parameter_struct(my_struct);
xy = rand(10,4);
axis = axes;
hold(axis, "on");
plot(axis, xy(:,1), xy(:,2), out{1}{:}) % 'Color','red','LineWidth',0.5
plot(axis, xy(:,3), xy(:,4), out{8}{:}) % 'Color','green','LineWidth',2
hold(axis, "off");

引用格式

Bernard Beitz (2024). Unfold Named Parameter Struct (https://github.com/bernb/unfold-named-narameter-struct/releases/tag/1.0.1), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2022a
与 R2019b 及更高版本兼容
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.1

See release notes for this release on GitHub: https://github.com/bernb/unfold-named-narameter-struct/releases/tag/1.0.1

1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库