Good morning people,
I have a big algorithm and I would like to use different data without having to repeat the algorithm (for and if loops) many times. Any idea how?
I am pasting some part of my code as an example:
if j==1 Tin(j)=20; Con(j) = H1(j)+Qel(j)*u(j); NL_(j) = Con(j) - PV1(j); Terr(j)=Ts(j)-Tin(j); u(j)=0; SOC(j)=0.5; if Terr(j)>=1 u(j)=1; end end
I would like to change H1 for H2, H3,… Hn, as well as PV1, PV2,… PVn
Best Answer