{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Wixon_Valley - Copy

Wixon_Valley - Copy - end Load in points to classify[latp...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% PROGRAM Wixon_Valley.m % % Purpose: % This program reads in the location of the boudary corners defining % Wixon Valley, Texas, then converts them to state plane coordinates, and then % checks whether the random points are inside or outside the city limits. % % Define variables: % points -- Points % randompoints -- Random points % n -- Classified random points % latp -- Latitude of points in decimal degrees % longp -- Longitude of points in decimal degrees % % % Garrett Lucas % 317009025 % Spring 2010 % Load in the way points load WV_Boundary.dat % Convert points to decimal degrees points = zeros(length(WV_Boundary),2); for i = 1:size(WV_Boundary,1); points(i,1) = WV_Boundary(i,1) + WV_Boundary(i,2)/60 + WV_Boundary(i,3)/3600; points(i,2) = WV_Boundary(i,4) + WV_Boundary(i,5)/60 + WV_Boundary(i,6)/3600; % Store northing in y-component and easting in x-component [points(i,2),points(i,1)] = gcpg83(points(i,1),points(i,2));
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end % Load in points to classify [latp, longp] = get_points; % Convert random points to state plane coordinates randompoints = zeros(length(latp),2); for i = 1:length(latp) [randompoints(i,2),randompoints(i,1)] = gcpg83(latp(i),longp(i)); end % Classify random points n = zeros(length(points)+1,2); for i = 1:length(points) n(i,1) = points(i,1); n(i,2) = points(i,2); n(length(n),1) = points(1,1); n(length(n),2) = points(1,2); end % Create Plot in = inpolygon(randompoints(:,1),randompoints(:,2),n(:,1),n(:,2)); plot(n(:,1),n(:,2),randompoints(in,1),randompoints(in,2),'*r', randompoints(~in,1),randompoints(~in,2),'.b') axis([1.081*10^6 1.087*10^6 3.126*10^6 3.131*10^6]); title('\bfClassification of Points near Wixon Valley, Texas'); xlabel('\bfEasting (Central Texas Zone NAD-83), (m)'); ylabel('\bfNorthing (Central Texas Zone NAD-83), (m)');...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern