Structure filed decapsulator

バージョン 1.0.1 (1.36 KB) 作成者: Jungmin kim
This function creates variables in the workspace for each struct field with the field's name & value
ダウンロード 1 件
更新 2024/3/30

ライセンスの表示

This function creates a variable in the executed workspace for each of the fields in the struct with the name and value of each field. It's intended to run in a local function, but it can also work elsewhere, probably.
This function only works when executed in the following manner:
function xxx = yyy(zzz)
evalComment = decapsulator(config,'config',0); % 0 is not vorbose, 1 is verbose at command line
eval(evalComment);
%%% You can play every val in the structure !!!
end
The idea of this function is to create an evalComment when varnargin is 3, and a function that is executed by eval when varargin is 4.
Good luck, commander !

引用

Jungmin kim (2024). Structure filed decapsulator (https://www.mathworks.com/matlabcentral/fileexchange/162046-structure-filed-decapsulator), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2024a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.1

A new signature image is uploaded

1.0.0