deployFields

버전 1.0.1 (1.53 KB) 작성자: Elimelech Schreiber
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://kr.mathworks.com/matlabcentral/fileexchange/69247-deployfields), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Structures에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
1.0.1

just added intended usage example

1.0.0