⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectstat.m

📁 计量工具箱
💻 M
字号:
function [out,varargout]=selectstat(method,obs,variable,varargin)
% PURPOSE: This function selects objects on a statistic graph
%------------------------------------------------------------------------
% USAGE: [out,...]=selectstat(method,obs,variable,...)
%   where : method = type of statistic graph. Inputs and outputs depend on this parameter (see below)
%           obs = n x 1 0-1 variable: current selection. Selected spatial units are marked with a 1
%           variable = (n x 1) variable used to plot the statistic graph
%------------------------------------------------------------------------
% OUTPUTS: out = (n x 1) 0-1 variable: selected spatial units are marked with a 1
%------------------------------------------------------------------------
% MANUAL: The usage depends on the value of the 'method' parameter:
%   * method='box' : [out]=selectstat('box',obs,variable,frtbasse,frthaute,q1,med,q3,y) : Selection on a box and whiskers plot
%       where : frtbasse = the low value
%               frthaute = the high value
%               q1 = the lower quartile
%               med = the median
%               q3 = the upper quartile
%               y = second coordinate of the selected point
%-----------------
%   * method='density' : [out,inter,intersav,p]=selectstat('density',obs,variable,inter,intersav,p,x) : Selection on a density plot
%       where : inter = used to stock selected points
%               intersav = used to stock the selected interval
%               p = flag
%               x = first coordinate of the selected point
%       output : inter = modified variable inter
%                intersav = modified variable intersav
%                p = modified flag
%-----------------
%   * method='histo' : [out]=selectstat('histo',obs,variable,edge2,N,x,y) : Selection on an histogram
%       where : edge2 = vector of the edges of the classes of the histogram (edge2(end)=inf)
%               N = vector of the number of elements in the classes of the histogram
%               x = first coordinate of the selected  point
%               y = second coordinate of the selected  point
%-----------------
%   * method='bar' : [out]=selectstat('bar',obs,variable,edge2,N,x,y,edgeaff) : Selection on a bar plot
%       where : edge2 = vector of the edges of the classes of the bar plot (edge2(end)=inf)
%               N = vector of the number of elements in the classes of the bar plot
%               x = first coordinate of the selected  point
%               y = second coordinate of the selected  point
%               edgeaff = vector of the edges of the bars to plot
%-----------------
%   * method='moran' : [out,...]=selectstat('moran',obs,variable,submethod,...) : Seection on a moran plot
%       ** submethod='quadrant' : [out,affq1,affq2,affq3,affq4]=selecstat('moran',obs,variable,'quadrant',q1,q2,q3,q4,Q1,Q2,Q3,Q4,affq1,affq2,affq3,affq4) : Quadrant selection
%           where : q1 = handle of the first quadrant button
%                   q2 = handle of the second quadrant button
%                   q3 = handle of the third quadrant button
%                   q4 = handle of the fourth quadrant button
%                   Q1 = indices of the points in the first quadrant
%                   Q2 = indices of the points in the second quadrant
%                   Q3 = indices of the points in the third quadrant
%                   Q4 = indices of the points in the fourth quadrant
%                   affq1 = flag that tells if the first quadrant must be displayed
%                   affq2 = flag that tells if the second quadrant must be displayed
%                   affq3 = flag that tells if the third quadrant must be displayed
%                   affq4 = flag that tells if the fourth quadrant must be displayed
%           output : affq1 = modified flag
%                    affq2 = modified flag
%                    affq3 = modified flag
%                    affq4 = modified flag
%
%       ** submethod='point' : [out]=selectstat('moran',obs,variable,'point',WX,x,y) : Point selection
%           where : WX = (n x 1) variable to study on the second axis
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected point
%
%       ** submethod='poly' : [out,vectx,vecty]=selectstat('moran',obs,variable,'poly',WX,x,y) : Polygon selection
%           where : WX = (n x 1) variable to study on the second axis
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected  point
%           output : vectx = vector of the first coordinates of the points of the polygon
%                    vecty = vector of the second coordinates of the points of the polygon
%-----------------
%   * method='neighbour' : [out,L,L2]=selectstat('neighbour',obs,variable,submethod,I,J,W,L,L2,x,y) : Selection on the map
%       ** submethod='mappoint' : [out,L,Iclick]=selectstat('neighbour',obs,variable,'mappoint',I,J,W,L,x,y,long,lat,Iclick); % point selection
%           where : I = row indices of the elements that are different of zero in W
%                   J = column indices of the elements that are different of zero in W
%                   W = weigh matrix
%                   L = linkage matrix
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected  point
%                   long = longitudes of the points of the map
%                   lat = latitudes of the points of the map
%                   Iclick = (n x 1) 0-1 variable that tells the points that were selected
%           output : L = modified linkage matrix
%                    Iclick = modified selected points
%       ** submethod='mappoly' : [out,L,Iclick,vectx,vecty]=selectstat('neighbour',obs,variable,'mappoly',I,J,W,L,x,y,long,lat,Iclick); % polygon selection
%           where : I = row indices of the elements that are different of zero in W
%                   J = column indices of the elements that are different of zero in W
%                   W = weigh matrix
%                   L = linkage matrix
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected point
%                   long = longitudes of the points of the map
%                   lat = latitudes of the points of the map
%                   Iclick = (n x 1) 0-1 variable that tells the points that were clicked
%           output : L = modified linkage matrix
%                    Iclick = modified clicked points
%       ** submethod='neigh' [out,L,L2]=selectstat('neighbour',obs,variable,'neigh',I,J,W,L,L2,x,y);
%           where : I = row indices of the elements that are different of zero in W
%                   J = column indices of the elements that are different of zero in W
%                   W = weigh matrix
%                   L = linkage matrix
%                   L2 = display matrix
%                   x = first coordinate of the selected point
%                   y = second coordinate of the selected point
%           output : L = modified linkage matrix
%                    L2 = modified display matrix
%-----------------
%   * method='scatter' : [out,...]=selectstat('scatter',obs,variable,submethod,...) : Selection on a scatter plot
%       ** submethod='class' : [obs,affc]=selectstat('scatter',obs,var1,'class',var2,BUTTON,Hbutt,vectclass,affc) : class selection
%
%       ** submethod='point' : [out]=selecstat('scatter',obs,variable,'point',var2,x,y) : Point selection
%           where : var2 = (n x 1) variable to study on the second axis
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected  point
%
%       ** submethod='poly' : [out,vectx,vecty]=selectstat('scatter',obs,variable,'poly',var2,x,y) : Polygon selection
%           where : var2 = (n x 1) variable to study on the second axis
%                   x = first coordinate of the selected point
%                   y = second coordinate of the selected  point
%           output : vectx = vector of the first coordinates of the points of the polygon
%                    vecty = vector of the second coordinates of the points of the polygon
%-----------------
%   * method='vario' : [out,...]=selectstat('vario',obs,variable,submethod,...) : Selection on a variocloud
%       ** submethod='point' : [out,L]=selecstat('vario',obs,variable,'point',H,V,Htri,Vtri,L,x,y) : Point selection
%           where : H = distance matrix
%                   V = vario matrix
%                   Htri = distance vector
%                   Vtri = vario vector
%                   L = linkage matrix
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected point
%           output : L = modified linkage matrix
%
%       ** submethod='poly' : [out,L,vectx,vecty]=selecstat('vario',obs,variable,'poly',H,V,Htri,Vtri,L,x,y) : Polygon selection
%           where : H = distance matrix
%                   V = vario matrix
%                   Htri = distance vector
%                   Vtri = vario vector
%                   L = linkage matrix
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected  point
%           output : L = modified linkage matrix
%                    vectx = vector of the first coordinates of the points of the polygon
%                    vecty = vector of the second coordinates of the points of the polygon
%-----------------
%   * method='angle' : [out,...]=selectstat('angle',obs,variable,submethod,...) : Selection on an angle plot
%       ** submethod='point' : [out,L]=selecstat('angle',obs,variable,'point',Theta,V,Thetatri,Vtri,L,x,y) : Point selection
%           where : Theta = angle matrix
%                   V = difference matrix
%                   Thetatri = angle vector
%                   Vtri = difference vector
%                   L = linkage matrix
%                   x = first coordinate of the selected point
%                   y = second coordinate of the selected point
%           output : L = modified linkage matrix
%
%       ** submethod='poly' : [out,L,vectx,vecty]=selecstat('angle',obs,variable,'poly',Theta,V,Thetatri,Vtri,L,x,y) : Polygon selection
%           where : Theta = angle matrix
%                   V = difference matrix
%                   Thetatri = angle vector
%                   Vtri = difference vector
%                   L = linkage matrix
%                   x = first coordinate of the selected  point
%                   y = second coordinate of the selected point
%           output : L = modified linkage matrix
%                    vectx = vector of the first coordinates of the points of the polygon
%                    vecty = vector of the second coordinates of the points of the polygon
%-----------------
%   * method='polybox' : out=selectstat('polybox',obs,variable,frtbasse,frthaute,q1,med,q3,vectbox,valeurs,var2,x,y); selection on a multiple box and whiskers plot
%       where : frtbasse = vector of the low values
%               frthaute = vector of the high values
%               q1 = vector of the lower quartiles
%               med = vector of the medians
%               q3 = vector of the upper quartile
%               vectbox = cell of vectors containing the values of the first variable for every value of the second variable
%               valeurs = vector of the values of the second variable
%               var2 = vector of the second variable
%               x = first coordinate of the selected  point 
%               y = second coordinate of the selected  point
%-----------------
%   * method='gini' : [out,GG,xsol]=selectstat('gini',obs,variable,FuncF,FuncG,Xk,x); selection on a gini plot
%       where : FuncF = vector of the values of the step function built thanks to f (see ginimap.m)
%               FuncG = vector of the values of the step function built thanks to g (see ginimap.m)
%               Xk = vector of the unique values of variables
%               x = first coordinates of the selected  point
% ----------------
%   * method='scatter3d' : obs=selectstat('scatter3d',obs,var1,var2,var3,cpa) : selection on a 3D scatterplot
%--------------------------------------------------------------------
% Christine Thomas-Agnan, Anne Ruiz-Gazen, Julien Moutel
% June 2003
% Universit

⌨️ 快捷键说明

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