congregate

버전 1.0.0 (8.03 KB) 작성자: Anver Hisham
Fetch values from an array of cells (or an array of structures) and create a matrix.
다운로드 수: 3
업데이트 날짜: 2019/3/31

DETAILED DESCRIPTION
Have you ever tried to create a submatrix from an array of cells? Or extract values of a specific member from an array of strctures? If so, this function is for you!! Please see the examples below to get more info upon this function.

EXAMPLES

1. Extracting submatrix from an array of cells
A = {11,12,13;21,22,23};
congregate('A{1:2,2:3}')
ans =
12 13
22 23

2. Converting an array of structures to a 2x3 matrix
S(1).a=[1,2,3]';
S(2).a=[4,5,6]';
congregate('S(:).a')
ans =
1 2 3
4 5 6

3. Converting an array of structures of structures to a 2x2x3 matrix
T(1).a(1).b=[111,112,113]';
T(1).a(2).b=[121,122,123]';
T(2).a(1).b=[211,212,213]';
T(2).a(2).b=[221,222,223]';
congregate('T(:).a(:).b')
ans(:,:,1) =
111 121
211 221
ans(:,:,2) =
112 122
212 222
ans(:,:,3) =
113 123
213 223

인용 양식

Anver Hisham (2024). congregate (https://github.com/anverhisham/congregate), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2019a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.