MATGPR_R3(地质雷达信号处理)


本软件为开放式软件,您也可以把您的好的代码加入进来。利用本软件可以对多种地质雷达数据进行预处理,滤波,建模反演等。
资源截图
代码片段和文件信息
function [x0y0] = centroid(xy)
%
% CENTROID Center of mass of a polygon.
%
% [X0Y0] = CENTROID(XY) 
%   
% Calculates centroid (center of mass) of planar polygon with vertex 
% coordinates X Y.
% Z0 = CENTROID(X+i*Y) returns Z0=X0+i*Y0 the same as CENTROID(XY).
%
%  Copyright (c) 1995 by Kirill K. Pankratov
%       kirill@plume.mit.edu.
%       06/01/95 06/07/95
%
% Algorithm:
%  X0 = Int{x*ds}/Int{ds} where ds - area element
%  so that Int{ds} is total area of a polygon.
%  Using Green‘s theorem the area integral can be 
%  reduced to a contour integral:
%  Int{x*ds} = -Int{x^2*dy} Int{ds} = Int{x*dy} 
%  along the perimeter of a polygon.
%  For a polygon as a sequence of line segments
%  this can be reduced exactly to a sum:
%  Int{x^2*dy} = Sum{ (x_{i}^2+x_{i+1}^2+x_{i}*x_{i+1})*(y_{i+1}-y_{i})}/3;
%  Int{x*dy} = Sum{(x_{i}+x_{i+1})(y_{i+1}-y_{i})}/2.
%  Similarly
%  Y0 = Int{y*ds}/Int{ds} 
%  where
%  Int{y*ds} = Int{y^2*dx} = ...
%            = Sum{ (y_{i}^2+y_{i+1}^2+y_{i}*y_{i+1})*(x_{i+1}-x_{i})}/3.
%

 % Handle input ......................
if nargin==0 help centroid return end
if nargin==1
  sz = size(x);
  if sz(1)==2      % Matrix 2 by n
    y = x(2:); x = x(1:);
  elseif sz(2)==2  % Matrix n by 2
    y = x(:2); x = x(:1);
  else
    y = imag(x);
    x = real(x);
  end
end 

 % Make a polygon closed ..............
x = [x(:); x(1)];
y = [y(:); y(1)];

 % Check length .......................
l = length(x);
if length(y)~=l
  error(‘ Vectors x and y must have the same length‘)
end

 % X-mean: Int{x^2*dy} ................
del = y(2:l)-y(1:l-1);
v = x(1:l-1).^2+x(2:l).^2+x(1:l-1).*x(2:l);
x0 = v‘*del;

 % Y-mean: Int{y^2*dx} ................
del = x(2:l)-x(1:l-1);
v = y(1:l-1).^2+y(2:l).^2+y(1:l-1).*y(2:l);
y0 = v‘*del;

 % Calculate area: Int{y*dx} ..........
a = (y(1:l-1)+y(2:l))‘*del;
tol= 2*eps;
if abs(a) < tol
  disp(‘ Warning: area of polygon is close to 0‘)
  a = a+sign(a)*tol+(~a)*tol;
end
 % Multiplier
a = 1/3/a;

 % Divide by area .....................
x0 = -x0*a;
y0 =  y0*a;

if nargout < 2 x0 = x0+1i*y0; end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-12-18 00:58  MATGPR_R3analysis
     目录           0  2013-10-26 11:33  MATGPR_R3analysisalternative
     目录           0  2013-11-18 22:10  MATGPR_R3analysisalternativegazdagmig+migrate.f90
     文件        1697  2013-11-18 22:10  MATGPR_R3analysisalternativegazdagmig+migrate.f90gazdagmig.p
     文件      170496  2004-03-30 01:40  MATGPR_R3analysisalternativegazdagmig+migrate.f90migrate.exe
     文件        9368  2004-03-30 01:40  MATGPR_R3analysisalternativegazdagmig+migrate.f90migrate.f90
     目录           0  2013-11-18 22:12  MATGPR_R3analysisalternativeSplitstep_model+radar2d4.f90
     文件      477244  2006-01-04 03:28  MATGPR_R3analysisalternativeSplitstep_model+radar2d4.f90
adar2d4.exe
     文件       32077  2006-01-04 03:28  MATGPR_R3analysisalternativeSplitstep_model+radar2d4.f90
adar2d4.f90
     文件        2209  2013-11-18 22:12  MATGPR_R3analysisalternativeSplitstep_model+radar2d4.f90splitstep2dmodel.p
     文件         931  2013-11-18 20:48  MATGPR_R3analysisBSplineWaveletFilter.p
     文件        6505  2013-11-18 20:49  MATGPR_R3analysisuild2dmodel.p
     文件         268  2013-11-18 20:49  MATGPR_R3analysiscbspldv.p
     文件         826  2013-11-18 20:49  MATGPR_R3analysiscbsplwv.p
     文件        2161  2013-10-25 13:31  MATGPR_R3analysiscentroid.m
     文件        1437  2013-12-18 00:57  MATGPR_R3analysisCentroidFrequency.p
     文件        1973  2013-11-18 20:48  MATGPR_R3analysisCurveletFilter.p
     文件        4060  2013-11-18 20:48  MATGPR_R3analysisCurveletSelectCoefficients.p
     文件         369  2013-11-18 20:49  MATGPR_R3analysisdewow.p
     文件        2733  2013-11-18 20:49  MATGPR_R3analysiseditmarkers.p
     文件        2225  2013-11-19 15:42  MATGPR_R3analysiseditscanaxis.p
     文件        1527  2013-11-18 20:49  MATGPR_R3analysisequalize.p
     文件        2079  2013-11-19 21:50  MATGPR_R3analysisfdct_wrapping.p
     文件         252  2013-11-19 21:50  MATGPR_R3analysisfdct_wrapping_window.p
     目录           0  2013-11-18 22:09  MATGPR_R3analysisfdtd
     文件         957  2013-10-26 11:21  MATGPR_R3analysisfdtdlackharrispulse.m
     文件        1001  2013-10-26 11:18  MATGPR_R3analysisfdtdfinddt.m
     文件        2200  2013-10-26 10:51  MATGPR_R3analysisfdtdfinddx.m
     文件        2098  2013-11-18 22:09  MATGPR_R3analysisfdtdgetemproperties.p
     文件         828  2013-10-26 11:17  MATGPR_R3analysisfdtdgridinterp.m
     文件         784  2013-10-26 11:15  MATGPR_R3analysisfdtdpadgrid.m
............此处省略489个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)