Question: How to write a the iteration code in Maple

Dears I have the following statment in Matlab

r=8;             ZUM=U(1)-YU(1);            IT=0;

for r=2:10

    ZU(r)=abs(U(r)-YU(r));

    if ZU(r)> ZUM

        ZUM=ZU(r);

    else

        ZUM=ZUM;

    end

end

ZUM;

while IT < 20

    IT=IT+1

    if ZUM < (0.1)^r

    IT=20;

    else

  for r=1:Nx

  YU(r)=U(r);

  end

YU;

I need to write this statment in Maple

Please Wait...