フィルターのクリア

concatenating elements of cell

3 ビュー (過去 30 日間)
NAVNEET NAYAN
NAVNEET NAYAN 2021 年 9 月 30 日
回答済み: Bryant Lash 2021 年 9 月 30 日
I have a data in 300-by-1 cells and each cell contains 500-by-1 single value. How can I make it 1) two 150-by-500 matrix containing these single values and place in 2 cells and 2) a cell containing 300-by-500 single values?
I am able to concatenate 3 or 4 cells manually, but how can I do it for 300 cells?
In case, you have any query feel free to comment

採用された回答

Bryant Lash
Bryant Lash 2021 年 9 月 30 日
If you want to do it in a pretty brutish way you can do this
[cellData{300,1}] = [1:500]'; %initialize cellData
matrixedData = [cellData{:}]'; %gives you a 300X500
problem1mat1 = matrixedData(1:150,:);
problem1mat2 = matrixedData(151:300,:);
problem2 = {matrixedData};

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by