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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!