structfun2

Apply a binary operation function to each field of two input structures
178 download
Aggiornato 15 lug 2014

Visualizza la licenza

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

Cita come

Denis Anikiev (2024). structfun2 (https://www.mathworks.com/matlabcentral/fileexchange/47234-structfun2), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2014a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Structures in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0