Subscripted assignment dimension mismatch

4 次查看(过去 30 天)
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
You're trying to assign a 3D matrix into a 2D one. Try,
masking(:,:,:,1) = indx;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Entering Commands 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by