deployFields

deploys all fields of a structure as variables
ダウンロード: 13
更新 2018/10/28

ライセンスの表示

%DEPLOYFIELDS deploys all fields of the structure 'details', as variables,
% inside the caller's workspace.
%
%Syntax:
%DEPLOYFIELDS(details);
%DEPLOYFIELDS('structVarName');
%DEPLOYFIELDS;
%
%DEPLOYFIELDS accepts either a structure variable, or a name
% of a structure variable. The latter is faster because it doesn't involve
% copying the structure.
%
%If no argument is passed, DEPLOYFIELDS searches for the default structure
%variable name: 'details'.

Most common usage :

function [] = foo(details)
%default values:
a=1;
b=2;

deployfields; %deploy details. if details has fields .a .b, they will overwrite the default values.
...
....
.....

引用

Elimelech Schreiber (2026). deployFields (https://jp.mathworks.com/matlabcentral/fileexchange/69247-deployfields), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2018b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersStructures についてさらに検索
バージョン 公開済み リリース ノート
1.0.1

just added intended usage example

1.0.0