Struct array conversion

Convert in either direction between struct-array and structure of arrays

이 제출물을 팔로우합니다

Usage: new = struct2struct(old)

If 'old' is a scalar struct containing arrays (each with the same number of rows, N) then 'new' will be an N-by-1 struct-array whose fields have a single row.

If 'old' is an N-by-1 struct-array whose fields have a single row (e.g. as returned above) then 'new' will be a scalar structure whose fields have N rows.

Either representation can have advantages for representing basic spreadsheet or database information.

A struct of arrays allows fields to be added and removed more easily and eases computation of filtering or sorting indices.
(A struct of arrays is also the format returned from csv2struct.)

A struct-array makes it easier to apply filtering and sorting operations using the computed indices/indicators.

인용 양식

Ged Ridgway (2026). Struct array conversion (https://kr.mathworks.com/matlabcentral/fileexchange/27121-struct-array-conversion), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 받은 파일: csv2struct(filename)

카테고리

Help CenterMATLAB Answers에서 Data Types에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0