You are getting this error because variables x and y are not defined in your script. I think what you intended was something like the following:
x = A(:,1);
y = A(:,2);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!