function res=marche2(N) e=[0 1 ; 0 -1 ; 1 0 ; -1 0]; alea=floor(4.*rand(1,N-1))+1; aux=[0 0]; for j=1:N-1 aux=[aux ; aux($,:)+e(alea(j),:)]; end res=aux; //xmin=min(aux(:,1)); xmax=max(aux(:,1)); ymin=min(aux(:,2)) ; ymax=max(aux(:,2)); //isoview(xmin,xmax,ymin,ymax); //plot(aux(:,1),aux(:,2)) //x=0:0.1:8; //plot(sqrt(N)*cos(x),sqrt(N)*sin(x)) endfunction