create a cell array of N dimensions of type char
4 ビュー (過去 30 日間)
古いコメントを表示
As the title says,
How do i create a cell array of N dimensions of type char.
Thanks
0 件のコメント
回答 (1 件)
Dave B
2021 年 7 月 29 日
編集済み: Dave B
2021 年 7 月 29 日
A cell array has type cell, but you can use repelem/repmat to make a cell array where each cell contains an empty char:
If you want a cell array of size 1,n where each cell contains an empty char...
repelem({''},n)
Or for a cell of size m,n where each cell contains an empty char:
repmat({''},m,n)
For an n dimensional cell array, where the last dimension has a size>1, something like this:
sz=[1 2 3 4 5];
repmat({''},sz)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!