uscity10k.m
来自「物流分析工具包。Facility location: Continuous mi」· M 代码 · 共 40 行
M
40 行
function varargout = uscity10k(varargin)
%USCITY10K US cities with populations of at least 10,000 data.
% s = uscity10k Output all variables as structure 's'
%[x1,x2] = uscity10k Output only first 1, 2, etc., variables
% s = uscity10k('x',...) Output only variables 'x', ... as struct. 's'
%[x,...] = uscity10k('x',...) Output variables 'x', ... as variables
% = uscity10k(...,is) Output subset 'x(is)' using SUBSETSTUCT(s,is)
% where 'is' is vector of elements to extract
%
% Loads data file "uscity10k.mat" that contain the following variables:
% Name = m-element cell array of m city name strings
% ST = m-element cell array of m 2-char state abbreviations
% XY = m x 2 matrix of city lon-lat (in decimal deg)
% Pop = m-element vector of total population estimates (2000)
%
% Example: Extract name of all cities in North Carolina
% NCcity = uscity10k('Name',strcmp('NC',uscity10k('ST')))
%
% % NCcity = 'Albemarle'
% % ...
% % 'Winston-Salem'
%
% (Subset of USCITY)
%
% Derived from Source:
% http://www.census.gov/ftp/pub/tiger/tms/gazetteer/places2k.txt
%
% The place file contains data for all Incorporated and Census Designated
% places in the 50 states, the District of Columbia and Puerto Rico as of
% the January 1, 2000.
% 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 = {'Name','ST','XY','Pop'};
[errstr,varargout] = loaddatafile(varargin,nargout,varnames,mfilename);
if ~isempty(errstr), error(errstr), end
% End (Input Error Checking) **********************************************
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?