title: Writing Lon,Lat coordinates to a shapefile in Matlab with projection
body: <p>I have a list of longitude and latitude points that plot an object moving over time on a map; it sort of forms a line that curves around a bit.  I am using Matlab to generate these points and would like to export them into a polyline shapefile to load in ArcGIS.</p>
  
  <p>After looking at <a href="http://www.mathworks.com/help/toolbox/map/f20-15124.html#f20-12334" rel="nofollow">this</a> example from the mathworks website, I am able to create a line geostruct object:  </p>
  
  <pre><code>[Tracks(1:length(myLon)-1).Geometry] = deal('Line');
  trackType = 'gc';
  [Tracks.Type] = deal(trackType);
  for i = 1:(length(myLon)-1)
      [Tracks(i).Lon Tracks(i).Lat] = track2(trackType, myLon(i, 1), myLat(i, 1), myLon(i+1, 1), myLat(i+1, 1));
  end
  
  shapewrite(Tracks, 'path_line');
  </code></pre>
  
  <p>This generally works fine but Geostruct does not contain any type of projection, although the documentation claims Mapstruct does.  Unfortunately I don't see any examples or functions on how to create a Mapstruct.  Does anyone know how I would go about doing that?</p>
  
  <p>Also, I tried to create a Point Geostruct instead of a line using the mathworks example, but it doesn't generate the .dbf file, only .shp and .shx files.  Is there any explanation for this?  Thanks for any suggestions!</p>