Cell2Vec

버전 1.1.0.0 (10.1 KB) 작성자: Jan
Concatenate cell elements to a vector - fast C-Mex
다운로드 수: 1.3K
업데이트 날짜: 2015/5/3

라이선스 보기

CELL2VEC - Concatenate cell elements to a vector
V = Cell2Vec(C)
INPUT:
C: Cell array of any size and types:
DOUBLE, SINGLE, (U)INT8/16/32/64, LOGICAL, CHAR.
The elements of C can have different sizes.
OUTPUT:
V: [1 x N] vector of all elements.

EXAMPLE:
C = {1, 2; 3, 4};
V = Cell2Vec(C) % [1, 3, 2, 4] columnwise order
M = reshape(V, size(C)) % [1, 2; 3, 4]

This C-Mex is up to 5 times faster than CAT(C{:}), HORZCAT or CELL2MAT.

Pre-compiled Mex-files can be downloaded: http://www.n-simon.de/mex
Run the unit-test uTest_Cell2Vec after compiling.

Tested: Matlab 6.5, 7.7, 7.8, WinXP, 32bit
Compiler: LCC2.4/3.8, BCC5.5, OWC1.8, MSVC2008
Assumed Compatibility: higher Matlab versions, Mac, Linux, 64bit

See also: CStr2String, CELL2MAT.

인용 양식

Jan (2024). Cell2Vec (https://www.mathworks.com/matlabcentral/fileexchange/28916-cell2vec), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

Better error messages and cleaned help section.

1.0.0.0