% continuous controller function pol=contin1(mp,m,Ulower,Uupper) ul=Ulower; % lower bound of u uu=Uupper; % upper bound of u ur=uu-ul; cop=mp; rn=rand; pom=0; for f=1:m if (pomrn) uop=ul+pom*ur; pol=uop; end pom=pom+cop(f); end