필터 지우기
필터 지우기

Subscripted assignment dimension mismatch

조회 수: 1 (최근 30일)
Tracy Campbell
Tracy Campbell 2017년 8월 10일
답변: Sangeetha Jayaprakash 2017년 8월 14일
LULCmaster = zeros(180,296,85);
for scen=1:1
if scen == 1;
scStr = '10_B_10';
end
end
%}
for yr=1986:2013
yearStr = num2str(yr);
LULCmaster(:,:,yr-1985) = ascii2ncIBIS([s1 yearStr s2]);
end
for yr=2014:2070
yearStr = num2str(yr);
LULCmaster(:,:,yr-1985) = ascii2ncIBIS([s1 scStr '_' yearStr s3]);
end
The errors occurs in the following line:
LULCmaster(:,:,yr-1985) = ascii2ncIBIS([s1 yearStr s2]);
  댓글 수: 1
kowshik Thopalli
kowshik Thopalli 2017년 8월 11일
What are the dimensions of s1 and s2. What exactly does this function do ascii2ncIBIS?

댓글을 달려면 로그인하십시오.

답변 (1개)

Sangeetha Jayaprakash
Sangeetha Jayaprakash 2017년 8월 14일
This error is most likely because you are attempting to assign elements to an existing array, but the size of the variable you are trying to assign may not be compatible with the existing array i.e. The size of "LULCmaster" may not be compatible to what "ascii2ncIBIS" function is returning.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by