Hi, I wrote a simple code. I used nested for loops, because of this, the code works very slowly and it gets big time. Is there any way to better and faster work. Thanks for your helps.
for i=1:365 for j=1:8760 a=[g(i),g(i+1),g(i+2),g(i+3),g(i+4),g(i+5),g(i+6),g(i+7),g(i+8),g(i+9), j ]; p(j)= xyz (a,b,c,d); end [value,Index]=max(p); t(i)=Index;end
Best Answer