clustermap.m

来自「计量工具箱」· M 代码 · 共 32 行

M
32
字号
function [out,out2]=clustermap(long,lat,dataset,clustnum,method,varargin)
% PURPOSE: This function links a map and a bar plot of the classification variable created by the kmeans method
%------------------------------------------------------------------------
% USAGE: out=clustermap(long,lat,dataset,clustnum,method,carte,label,symbol)
%   where : 
%           long = n x 1 vector of coordinates on the first axis
%           lat = n x 1 vector of coordinates on the second axis
%           dataset = n x p matrix of the variables to study
%           clustnum = number of clusters
%           method = clustering method : method=1 :kmeans based on point data
%                                        method=2 : kmeans based on a distance matrix
%           carte = n x 2 optionnal matrix giving the polygons of the edges of the spatial units
%           label = n x 1 optionnal variable used to label selected observations
%           symbol = * symbol=1 : selected spatial units are marked with a different symbol
%                    * symbol=0 : selected spatial units are marked with a different color only (default)
%------------------------------------------------------------------------
% OUTPUTS: out = (n x 1) 0-1 variable: selected spatial units are marked with a 1  
%          out2 = group variable
%------------------------------------------------------------------------
% MANUAL: Select points on the map by clicking with the left mouse button
%         Select bars on the bar plot by clicking with the left mouse button
%         You can select points inside a polygon on the map: - right click to set the first point of the polygon
%                                                            - left click to set the other points
%                                                            - right click to close the polygon
%         Selection is lost when you switch graph
%         To quit, click the middle button or press 'q'
% -----------------------------------------------------------------------
% uses kmeans.m, kmeans2.m, selectmap.m, selectstat.m
%------------------------------------------------------------------------
% Christine Thomas-Agnan, Anne Ruiz-Gazen, Julien Moutel
% June 2003
% Universit

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?