【发布时间】:2017-04-20 09:09:20
【问题描述】:
目前我正在使用以下代码:
for Ereignis = 1:(iteration)
Status = 1;
i = 0;
Weg = [];
Weg(1) = 1;
Belohnung = [];
Gewichtung = 0;
while Status ~= ZielStatus
while Gewichtung == 0
Aktion = random('unid',ZielStatus);
Gewichtung = q(Status,Aktion);
end
Status = Aktion;
i = i +1;
Weg(i+1) = Status;
Belohnung(i) = Gewichtung;
Gewichtung = 0;
if i >= 150
break
end
end
这给了我 1000 次输出迭代。
如果我用
显示它们disp(Weg)
我确实得到了很多输出......现在我只想显示每 100 次迭代......
我正在考虑将输出保存到一个数组中并显示每 100 个创建的数组,有什么帮助吗?
【问题讨论】: