structfun2

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

引用

Denis Anikiev (2026). structfun2 (https://jp.mathworks.com/matlabcentral/fileexchange/47234-structfun2), MATLAB Central File Exchange. に取得済み.

カテゴリ

Help Center および MATLAB AnswersStructures についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0.0