Subscripted assignment dimension mismatch

Hello, I'm trying to do the following assignment and get an error: "Subscripted assignment dimension mismatch" "masking" is new veriable and this is the first assignment to it. "indx" is as follow: 300x10x2011 logical
masking(:,:,1)=indx;
what is wrong?

 採用された回答

KL
KL 2017 年 11 月 25 日

0 投票

You're trying to assign a 3D matrix into a 2D one. Try,
masking(:,:,:,1) = indx;

1 件のコメント

Naor David
Naor David 2017 年 11 月 25 日
Thanks a lot! Helped me understand my mistake...:)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

質問済み:

2017 年 11 月 25 日

コメント済み:

2017 年 11 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by