how to convert cell in matrix

25 ビュー (過去 30 日間)
Sara
Sara 2018 年 9 月 6 日
コメント済み: Sara 2018 年 9 月 12 日
I have a 1*4 cell array and all members have the same size "{ [100*1] , [100*1], [100*1] ,[100*1]}" . I want to convert cell array in a way that get a matrix of (4*100). I mean each member of the cell array would be a column of my matrix.

採用された回答

OCDER
OCDER 2018 年 9 月 6 日
A = repmat({rand(100, 1)}, 1, 4); %your 1x4 cell containin 100x1 matrix per each cell
B = [A{:}] %your 100x4 matrix
  1 件のコメント
Sara
Sara 2018 年 9 月 12 日
Thanks for you help

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

その他の回答 (1 件)

Geoff Hayes
Geoff Hayes 2018 年 9 月 6 日
Sara - cell2mat might be what you are looking for.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by