フィルターのクリア

I want to create cell arrays containing all zero elements in them.

109 ビュー (過去 30 日間)
Teshome Kumsa
Teshome Kumsa 2022 年 6 月 15 日
コメント済み: Voss 2022 年 6 月 15 日
Dear all,
I am dealing with some stress transformation. I want to create a cell array C = cell (1,20). In each cell array, I want to fill C{1,1}=zeros (2600,6), C{1,2}=zeros (2600,6), and son. I can do this in a traditional way one by one, but I am here to see a simpler way. I want this because I will use a cell array of all zero elements in a loop.

採用された回答

Voss
Voss 2022 年 6 月 15 日
C = repmat({zeros(2600,6)},1,20)
C = 1×20 cell array
{2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double} {2600×6 double}
  2 件のコメント
Teshome Kumsa
Teshome Kumsa 2022 年 6 月 15 日
Thank you! I always get answers on this platform.
Voss
Voss 2022 年 6 月 15 日
You're welcome!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by