structfun2
Version 1.0.0.0 (2,92 ko) par
Denis Anikiev
Apply a binary operation function to each field of two input structures
Apply a binary operation function to each field of two input structures, including substructure fields of any level.
C = STRUCTFUN2(FUN, A, B) applies the function specified by FUN to each field of structures A and B, and returns the results in array C.
Examples:
s1 = struct; s1.a = 1; s1.b = 2; s1.c = struct; s1.c.a = 3;
s2 = struct; s2.a = 0; s2.b = 2; s2.c = struct; s2.c.a = -3;
s3 = structfun2(@plus, s1, s2);
Citation pour cette source
Denis Anikiev (2026). structfun2 (https://fr.mathworks.com/matlabcentral/fileexchange/47234-structfun2), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R2014a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
En savoir plus sur Structures dans Help Center et MATLAB Answers
Tags
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0.0 |
