%------------------------------------------------
% simple example of a for loop
%------------------------------------------------
clear all

x = -3:1:3;
n = length(x);
y = zeros(1,n);

for i = 1:n
  y(i) = x(i)^2;
end

whos
