for x=1:100; if sqrt(x) == floor(sqrt(x)) a(i)=1; end end a