Unfold Named Parameter Struct

Use this helper function if you want to call a function multiple times but each time with different values of named parameter.
5 téléchargements
Mise à jour 14 avr. 2022

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");

Citation pour cette source

Bernard Beitz (2025). Unfold Named Parameter Struct (https://github.com/bernb/unfold-named-narameter-struct/releases/tag/1.0.1), GitHub. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2022a
Compatible avec les versions R2019b et ultérieures
Plateformes compatibles
Windows macOS Linux
Tags Ajouter des tags

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
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

Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.
Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.