function [dir] = direction(E,N) dir = 90-atan2(N,E)*180/pi; i = find(dir<0); dir(i)=dir(i)+360; end