필터 지우기
필터 지우기

How to merge cell (100 x 3) of arrays into a single cell (100 x 1) by concatenating the arrays ?

조회 수: 2 (최근 30일)
I have a cell 100 x 3 where and cells(1,:) each contain an array 35x1. How do I convert this to a cell of 100 x 1 where the first cell would now contain an array 35x3 ?

채택된 답변

Stephen23
Stephen23 2017년 1월 17일
편집: Stephen23 2017년 1월 17일
Where X is the input cell array of size N*3:
cellfun(@(a,b,c)horzcat(a,b,c),X(:,1),X(:,2),X(:,3),'UniformOutput',false)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by