struct2vars

버전 1.0.0.1 (2.43 KB) 작성자: Matthew Eicholtz
Convert scalar structure into variables.
다운로드 수: 517
업데이트 날짜: 2016/5/27

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

STRUCT2VARS Convert scalar structure into variables.
STRUCT2VARS(S) unpacks the input structure, instantiating a variable in
the caller workspace for each fieldname and its corresponding value. If a
variable name already exists in the caller workspace, it will be overwritten
by this function.

[A,B,C,___] = STRUCT2VARS(S) unpacks each field of the input structure
into the specified outputs, i.e. the first field of S will be stored in
output variable A, the second field of S will be stored in output
variable B, and so forth. The number of outputs must be less than or
equal to the number of fieldnames in the structure.
[___] = STRUCT2VARS(___,NAMES) allows the user to specify which
fieldnames are unpacked. The order provided by the user is the order in
which fields are unpacked.

See also VARS2STRUCT <http://www.mathworks.com/matlabcentral/fileexchange/57371-vars2struct>.

인용 양식

Matthew Eicholtz (2026). struct2vars (https://kr.mathworks.com/matlabcentral/fileexchange/57370-struct2vars), MATLAB Central File Exchange. 검색 날짜: .

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

Added "See also" in description.
Minor edits to description.

1.0.0.0