nStep = 100;

[x,y] = createData(nStep);

figure(1)
plot(x);
figure(2)
plot(y,'rx');