% DioleFieldProfile extracts profiles in DipolefieldGui % DipoleFieldProfile is called by DipoleFieldGui % profilex extracts profile, at spacing sp, from % the grid X,Y,Z (same profile from Z1 Z2 if present) % X,Y,Z should already be contoured in the current figure window % when profilex is called %*********************************************************************************** % % Jim Merriam % University of Saskatchewan % jim.merriam@usask.ca % (Jan, 2006) % %*********************************************************************************** % axes(haxmain) axes(haxContour) set(ProfileHandle,'visible','off') set(StartTextHandle,'visible','off') set(EndTextHandle,'visible','off') set(StartTextHandle1,'visible','off') set(EndTextHandle1,'visible','off') disp('EXTRACT A PROFILE FROM THE GRID') disp('CLICK ON THE BEGINNING AND END POINTS OF THE PROFILE') [x_x,y_y]=ginput(2); ll=sqrt((x_x(2)-x_x(1))^2 + (y_y(2)-y_y(1))^2); % length of the profile sp=1; nx=round(ll/sp); % num of samples r=[0:nx]*sp; % sample locations along profile flip='n'; % flag for profile orientation if(x_x(2))