expcreatecontour

PURPOSE ^

EXPCREATECONTOUR - create a contour from a list of points

SYNOPSIS ^

function expcreatecontour(filename);

DESCRIPTION ^

EXPCREATECONTOUR - create a contour from a list of points

   expcreatecontour: from a list of (x,y) points (retrieve using ginput on an undetermined
   number of points: used RETURN key to end input), create an Argus .exp 
   file holding the corresponding closed contour.
    
   Usage:
      expcreatecontour(filename)

   See also EXPMASTER, EXPDOC

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function expcreatecontour(filename);
0002 %EXPCREATECONTOUR - create a contour from a list of points
0003 %
0004 %   expcreatecontour: from a list of (x,y) points (retrieve using ginput on an undetermined
0005 %   number of points: used RETURN key to end input), create an Argus .exp
0006 %   file holding the corresponding closed contour.
0007 %
0008 %   Usage:
0009 %      expcreatecontour(filename)
0010 %
0011 %   See also EXPMASTER, EXPDOC
0012 
0013 %Get root of filename
0014 [path root ext ver]=fileparts(filename);
0015 
0016 %Get contour
0017 disp('Click on contour points you desire. Type RETURN to end input of points');
0018 [x,y]=ginputquick;
0019 
0020 %close contour
0021 x=[x;x(1)];
0022 y=[y;y(1);];
0023 
0024 %plot contour
0025 hold on;
0026 plot(x,y,'r-');
0027 
0028 %create structure for expwrite routine
0029 a.x=flipud(x);
0030 a.y=flipud(y);
0031 a.name=root;
0032 a.density=1;
0033 
0034 %write contour using expwrite
0035 expwrite(a,filename);
0036

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003