Convert cell array to two row vector

9 ビュー (過去 30 日間)
BOB
BOB 2018 年 9 月 11 日
編集済み: Stephen23 2022 年 2 月 23 日
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

採用された回答

Andrei Bobrov
Andrei Bobrov 2018 年 9 月 11 日
cell2mat(hvix(:)')
  2 件のコメント
monica padala
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
Andrei Bobrov 2021 年 4 月 9 日
M = arrayfun(@(x)rand(4,1),ones(5,1),'un',0)
out = [M{:}]'

サインインしてコメントする。

その他の回答 (1 件)

Stephen23
Stephen23 2018 年 9 月 11 日
編集済み: Stephen23 2022 年 2 月 23 日

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by