Convert cell array to two row vector
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi folks,
I have the following cell array:
hvix =
[2x1 double]
[2x8 double]
[2x15 double]
[2x1 double]
I want to concatenate them into a 2 x 25 matrix. Is this possible?
Thanks
댓글 수: 0
채택된 답변
Andrei Bobrov
2018년 9월 11일
cell2mat(hvix(:)')
댓글 수: 2
monica padala
2021년 4월 8일
Hi, I have the following cell array:
M =
[Ax1 double]
[Bx1 double]
[Cx1 double]
[Dx1 double]
[Ex1 double]
Is it possible to concatenate them into 5x4 matrix ?
output = [A B C D E] matrix
Andrei Bobrov
2021년 4월 9일
M = arrayfun(@(x)rand(4,1),ones(5,1),'un',0)
out = [M{:}]'
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!