image thumbnail

MergeCell

버전 1.1.0.0 (1.78 KB) 작성자: Diederick
Merges contents of multiple cell arrays into one big cell array, with expansion

다운로드 수: 328

업데이트 날짜: 2012/2/2

라이선스 보기

MergeCell takes any number of cell vectors (contain the same datatype) and concatenates their contents into one big cellvector
Any signleton inputs are expanded as needed, these inputs can be 1x1 cells or the contained datatype itself

Example: To add some information about fit to plot legend, we'd wan't to append information about the fit to the line labels:

linelbls = {'line a','line b','line c'};
slope = [.9 1 4.2];
slopetxt= arrayfun(@(x) sprintf('%.3f',x),slope,'UniformOutput',false);

leglbls = MergeCell(linelbls,', slope: ',slopetxt);
% leglbls = MergeCell(linelbls,{', slope: '},slopetxt); would be equivalent

인용 양식

Diederick (2022). MergeCell (https://www.mathworks.com/matlabcentral/fileexchange/29866-mergecell), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!