?? uszip5.m
字號:
function varargout = uszip5(varargin)
%USZIP5 US 5-digit ZIP code data.
% s = uszip5 Output all variables as structure 's'
%[x1,x2] = uszip5 Output only first 1, 2, etc., variables
% s = uszip5('x',...) Output only variables 'x', ... as struct. 's'
%[x,...] = uszip5('x',...) Output variables 'x', ... as variables
% = uszip5(...,is) Output subset 'x(is)' using SUBSETSTUCT(s,is)
% where 'is' is vector of elements to extract
%
% Loads data file "uszip5.mat" that contain the following variables:
% Code5 = m-element vector of m 5-digit ZIP (ZCTA) codes
% XY = m x 2 matrix of lon-lat (in decimal deg)
% ST = m-element cell array of m 2-char state abbreviations
% Pop = m-element vector of total population estimates (2000)
% isCUS = m-element logical vector if ZIP code is in continental U.S.
% House = m-element vector of total housing units (2000)
% LandArea = m-element vector of land area (square miles)
% WaterArea = m-element vector of water area (square miles)
%
% Example 1: Extract ZIP codes of all cities in North Carolina
% NCzip = uszip5('Code5',strcmp('NC',uszip5('ST')))
%
% % NCzip = 27006
% % ...
% % 28909
%
% Example 2: 5-digit ZIP codes with population in continental U.S.
% z = uszip5(uszip5('isCUS') & uszip5('Pop') > 0);
% makemap(z.XY)
% pplot(z.XY,'g.')
%
% Source:
% http://www.census.gov/ftp/pub/tiger/tms/gazetteer/zcta5.txt
%
% ZIP codes derived from the US Census Bureau's ZCTA files. ZIP Code
% Tabulation Areas (ZCTAs) are a new statistical entity developed for the
% Census 2000 to overcome difficulties in precisely defining the land area
% covered by each ZIP Code (see http://www.census.gov/geo/ZCTA/zcta.html).
% Contains data for all 5 digit ZCTAs in the 50 states, District of
% Columbia and Puerto Rico as of Census 2000.
%
% Additional ZIP code data taken from Zip Code Database (v1.0) (see
% http://www.cfdynamics.com/cfdynamics/zipbase/index.cfm). This data
% includes P.O. Box and Military ZIP codes not in the ZCTA files (these
% codes do not have population data associated with them, and codes
% with NaN lon-lat have been removed).
%
% See also USZIP3
% Copyright (c) 1994-2006 by Michael G. Kay
% Matlog Version 9 13-Jan-2006 (http://www.ie.ncsu.edu/kay/matlog)
% Input Error Checking ****************************************************
varnames = {'Code5','XY','ST','Pop','isCUS','House','LandArea','WaterArea'};
[errstr,varargout] = loaddatafile(varargin,nargout,varnames,mfilename);
if ~isempty(errstr), error(errstr), end
% End (Input Error Checking) **********************************************
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -