struct2pairs( struc )

Create cell-array with pairs of field name and field value.
19 téléchargements
Mise à jour 31 juil. 2017

Afficher la licence

Storing a number of Name-Value-Pairs as a structure is convenient, maintainable and easy to read in code. User struct2pairs when passing them into a function.
Example:
...
lineconfig = struct( 'Color','r', 'LineStyle','--', 'MarkerSize',3, ... );
pairs = struct2pairs(lineconfig);
plot(data,data, pairs{:})

Citation pour cette source

Roman Müller-Hainbach (2025). struct2pairs( struc ) (https://fr.mathworks.com/matlabcentral/fileexchange/63930-struct2pairs-struc), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2006a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Structures dans Help Center et MATLAB Answers

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.0.0