Concatenate different sizes Cell Matrix

버전 1.0.0.0 (1.35 KB) 작성자: Francesco
Concatene cell matrix (row-wise or column-wise) regardless of the different sizes
다운로드 수: 117
업데이트 날짜: 2015/5/13

라이선스 보기

% Concatene cell matrix (row-wise or column-wise) regardless of the different sizes, filling the missing cells with NaN.
% This function generalize previous functions "K_cRows" and "K_cCols".
%
% c=K_cCells(b,a,'row') or c=K_cCells(b,a) or c=K_cCells(b,a,"everyCharOrNumber") for row-wise;
% c=K_cCells(b,a,'col') for column-wise;

A={'a11' 'a12';'a21' 'a22'}

A =

'a11' 'a12'
'a21' 'a22'

>> B={'b11' 'b12' 'b13'; 'b21' 'b22' 'b32'; 'b31' 'b32' 'b33'}

B =

'b11' 'b12' 'b13'
'b21' 'b22' 'b32'
'b31' 'b32' 'b33'

>> C=K_cCells(A,B)

C =

'a11' 'a12' []
'a21' 'a22' [ ]
'b11' 'b12' 'b13'
'b21' 'b22' 'b32'
'b31' 'b32' 'b33'

>> C=K_cCells(A,B,'col')

C =

'a11' 'a12' 'b11' 'b12' 'b13'
'a21' 'a22' 'b21' 'b22' 'b32'
[ ] [ ] 'b31' 'b32' 'b33'

인용 양식

Francesco (2025). Concatenate different sizes Cell Matrix (https://kr.mathworks.com/matlabcentral/fileexchange/50832-concatenate-different-sizes-cell-matrix), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
태그 태그 추가
도움

도움 준 파일: gold spot

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0