function [x,y] = RandWalk(N)
% Simulate a 2D random walk in an (2N+1)-by-(2N+1) grid.
% N is a positive integer.
% Walk starts from the origin and continues until the an edge, abs(N),
% is reached.
% x and y are row vectors with the property that (x(k),y(k)) is the
% location of the token after k hops, k=1:length(x).
% Initializations...
k = 0; xc = 0; yc=0;
% (xc,yc) is the location after k hops.
while abs(xc)