xmax= 20;
x=[1:1:xmax];
for i=1: xmax
    y(i)=x(i)^2;
end
for j=1:xmax
    z(j)=x(j)^3;
end
for k=1:xmax
    w(k)=(50*k)*sin(x(k));
end
plot(x,y, x, z, x,w)
xlabel('integer')
ylabel ('power')
title('comparing powers')
grid on
legend('square','cube','sin')


