The variable Edj appears to change size consider preallocating
조회 수: 2 (최근 30일)
이전 댓글 표시
VV(1:size(temp,1),d)=temp;
for j=1:n
E(d,j) = y(j,:)*VV(s+1:s+m,d) / (x(j,:)*VV(1:s,d));
end
Ecros =sum(Edj)/n
End
댓글 수: 0
채택된 답변
Gifari Zulkarnaen
2020년 1월 1일
편집: Gifari Zulkarnaen
2020년 1월 3일
The size of your matrix changes at every iteration. Make zero matrix before looping. For example:
Edj = zeros(d,n);
*edited for corrections from Image Analyst and Jacob Muvingi
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!