Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
What does Subscripted assignment dimension mismatch mean? I keep getting the same error?
조회 수: 2 (최근 30일)
이전 댓글 표시
I keep getting the same error for the following code:-
Error in dct1 (line 12) d(j,k) = c*double(b(j,k));
whereby c = dctmtx(8), and is a 8 * 8 doubles matrix.... I tried replacing c*double(b(j,k)) with c.*double(b(j,k)) but it returned the same error..... Whelp ?
M = 1600
N = 3600
for j = 1:8:M
for k = 1:8:N
d(j,k) = c*double(b(j,k)); //c is a 8*8 doubles matrix
end
end
댓글 수: 0
답변 (2개)
Yoav Livneh
2015년 2월 18일
The error means that the destination is not the same dimension as the source. In this case, you are trying to write an 8x8 matrix (c) into a 1x1 scalar (d(j,k)).
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!