フィルターのクリア

How can I fill a matrice with dimension 25x2x4 with another matrice 13x2x4?

1 回表示 (過去 30 日間)
Iremsu Savas
Iremsu Savas 2018 年 7 月 30 日
コメント済み: Iremsu Savas 2018 年 7 月 30 日
Hello I have a matrice "islands" has a size 25x2x4 and I have another matrix "Indx" has a size 13x2x4. I want to fill my "islands" matrix with the Indx matrix from 1 to 13 and then I would like to give zero value to the ones from 13 to 25. But when I try it it gives dimension mismatch. How can I do it in a proper way?

採用された回答

Woody
Woody 2018 年 7 月 30 日
islands = zeros(25,2,4);
islands(1:13,:,:) = indx;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by