程式码如下:
iteration=100;
p=2;
theta_0=10*rand(p,1);
theta=theta_0;
PE_old=PE(theta);
for i=1:iteration
thetanew=10*rand(p,1);
PE_new=PE(thetanew);
if PE_new < PE_old
theta=thetanew;
PE_old =PE_new;
else
end
plot(i,PE_old)
end
目前是希望能跑出100个图
但是执行之后跑出来的图完全没有画线
请问该怎么解决呢?
谢谢