updated scripts for SSH, zero M error handling

This commit is contained in:
Kostas 2017-07-04 15:41:30 +02:00
parent fbba8ae4fd
commit 674a63f272
16 changed files with 119 additions and 51 deletions

View File

@ -3,8 +3,7 @@
%EVALUATES THE EXCEEDANCE PROBABILITY VALUES USING THE UPPER-BOUNDED G-R %EVALUATES THE EXCEEDANCE PROBABILITY VALUES USING THE UPPER-BOUNDED G-R
% LED MAGNITUDE DISTRIBUTION MODEL. % LED MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter % DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter
% relation leads to the upper truncated exponential distribution to model % relation leads to the upper truncated exponential distribution to model
@ -57,11 +56,17 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [x,z]=ExcProbGRT(opt,xd,xu,dx,y,Mmin,lamb,eps,b,Mmax) function [x,z]=ExcProbGRT(opt,xd,xu,dx,y,Mmin,lamb,eps,b,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dx<=0;error('Step must be greater than 0');end
%----------------------------------------------------------
beta=b*log(10); beta=b*log(10);
if opt==0 if opt==0
if xd<Mmin; xd=Mmin;end if xd<Mmin; xd=Mmin;end

View File

@ -3,8 +3,7 @@
%EVALUATES THE EXCEEDANCE PROBABILITY VALUES USING THE UNLIMITED G-R %EVALUATES THE EXCEEDANCE PROBABILITY VALUES USING THE UNLIMITED G-R
% LED MAGNITUDE DISTRIBUTION MODEL. % LED MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation % DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation
% leads to the exponential distribution model of magnitude distribution % leads to the exponential distribution model of magnitude distribution
@ -54,11 +53,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [x,z]=ExcProbGRU(opt,xd,xu,dx,y,Mmin,lamb,eps,b) function [x,z]=ExcProbGRU(opt,xd,xu,dx,y,Mmin,lamb,eps,b)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dx<=0;error('Step must be greater than 0');end
%----------------------------------------------------------
beta=b*log(10); beta=b*log(10);
if opt==0 if opt==0

View File

@ -5,8 +5,7 @@
% DISTRIBUTION FOR MAGNITUDE. % DISTRIBUTION FOR MAGNITUDE.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -66,12 +65,17 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [x,z]=... function [x,z]=...
ExcProbNPT(opt,xd,xu,dx,y,Mmin,lamb,eps,h,xx,ambd,Mmax) ExcProbNPT(opt,xd,xu,dx,y,Mmin,lamb,eps,h,xx,ambd,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dx<=0;error('Step must be greater than 0');end
%----------------------------------------------------------
if opt==0 if opt==0
if xd<Mmin; xd=Mmin;end if xd<Mmin; xd=Mmin;end
if xu>Mmax; xu=Mmax;end if xu>Mmax; xu=Mmax;end
@ -90,7 +94,7 @@ else
CDF_NPT=2*(Dystr_npr(y,xx,ambd,h)... CDF_NPT=2*(Dystr_npr(y,xx,ambd,h)...
-Dystr_npr(Mmin-eps/2,xx,ambd,h))./mian; -Dystr_npr(Mmin-eps/2,xx,ambd,h))./mian;
z=1-exp(-lamb*(1-CDF_NPT).*x); z=1-exp(-lamb*(1-CDF_NPT).*x);
if y>Mmax;z=zeros(size(x));end if y>Mmax;z=zeros(size(x));end %K15DEC2015
end end
end end

View File

@ -4,8 +4,7 @@
% EXCEEDANCE PROBABILITY VALUES FOR THE UNBOUNDED NONPARAMETRIC % EXCEEDANCE PROBABILITY VALUES FOR THE UNBOUNDED NONPARAMETRIC
% DISTRIBUTION FOR MAGNITUDE. % DISTRIBUTION FOR MAGNITUDE.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -64,11 +63,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [x,z]=ExcProbNPU(opt,xd,xu,dx,y,Mmin,lamb,eps,h,xx,ambd) function [x,z]=ExcProbNPU(opt,xd,xu,dx,y,Mmin,lamb,eps,h,xx,ambd)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dx<=0;error('Step must be greater than 0');end
%----------------------------------------------------------
x=(xd:dx:xu)'; x=(xd:dx:xu)';
n=length(x); n=length(x);

View File

@ -3,8 +3,7 @@
%EVALUATES THE MAXIMUM CREDIBLE MAGNITUDE VALUES USING THE UPPER-BOUNDED %EVALUATES THE MAXIMUM CREDIBLE MAGNITUDE VALUES USING THE UPPER-BOUNDED
% G-R LED MAGNITUDE DISTRIBUTION MODEL. % G-R LED MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter % DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter
% relation leads to the upper truncated exponential distribution to model % relation leads to the upper truncated exponential distribution to model
@ -43,10 +42,15 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [T,m]=Max_credM_GRT(Td,Tu,dT,Mmin,lamb,eps,b,Mmax) function [T,m]=Max_credM_GRT(Td,Tu,dT,Mmin,lamb,eps,b,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dT<=0;error('Time Step must be greater than 0');end
%----------------------------------------------------------
T=(Td:dT:Tu)'; T=(Td:dT:Tu)';
beta=b*log(10); beta=b*log(10);
mian=(1-exp(-beta*(Mmax-Mmin+eps/2))); mian=(1-exp(-beta*(Mmax-Mmin+eps/2)));

View File

@ -3,8 +3,7 @@
%EVALUATES THE MAXIMUM CREDIBLE MAGNITUDE VALUES USING THE UNLIMITED %EVALUATES THE MAXIMUM CREDIBLE MAGNITUDE VALUES USING THE UNLIMITED
% G-R LED MAGNITUDE DISTRIBUTION MODEL. % G-R LED MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation % DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation
% leads to the exponential distribution model of magnitude distribution % leads to the exponential distribution model of magnitude distribution
@ -44,11 +43,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [T,m]=Max_credM_GRU(Td,Tu,dT,Mmin,lamb,eps,b) function [T,m]=Max_credM_GRU(Td,Tu,dT,Mmin,lamb,eps,b)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dT<=0;error('Time Step must be greater than 0');end
%----------------------------------------------------------
T=(Td:dT:Tu)'; T=(Td:dT:Tu)';
beta=b*log(10); beta=b*log(10);
m=Mmin-eps/2+1/beta.*log(lamb*T); m=Mmin-eps/2+1/beta.*log(lamb*T);

View File

@ -4,8 +4,7 @@
% CREDIBLE MAGNITUDE VALUES FOR THE UPPER-BOUNDED NONPARAMETRIC % CREDIBLE MAGNITUDE VALUES FOR THE UPPER-BOUNDED NONPARAMETRIC
% DISTRIBUTION FOR MAGNITUDE. % DISTRIBUTION FOR MAGNITUDE.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -56,11 +55,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [T,m]=Max_credM_NPT(Td,Tu,dT,Mmin,lamb,eps,h,xx,ambd,Mmax) function [T,m]=Max_credM_NPT(Td,Tu,dT,Mmin,lamb,eps,h,xx,ambd,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dT<=0;error('Time Step must be greater than 0');end
%----------------------------------------------------------
T=(Td:dT:Tu)'; T=(Td:dT:Tu)';
n=length(T); n=length(T);
interval=[Mmin-eps/2 Mmax-0.001]; interval=[Mmin-eps/2 Mmax-0.001];

View File

@ -4,8 +4,7 @@
% THE MAXIMUM CREDIBLE MAGNITUDE VALUES FOR THE UNBOUNDED % THE MAXIMUM CREDIBLE MAGNITUDE VALUES FOR THE UNBOUNDED
% NONPARAMETRIC DISTRIBUTION FOR MAGNITUDE. % NONPARAMETRIC DISTRIBUTION FOR MAGNITUDE.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -58,11 +57,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [T,m]=Max_credM_NPU(Td,Tu,dT,Mmin,lamb,eps,h,xx,ambd) function [T,m]=Max_credM_NPU(Td,Tu,dT,Mmin,lamb,eps,h,xx,ambd)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dT<=0;error('Time Step must be greater than 0');end
%----------------------------------------------------------
T=(Td:dT:Tu)'; T=(Td:dT:Tu)';
n=length(T); n=length(T);
interval=[Mmin-eps/2 10.0]; interval=[Mmin-eps/2 10.0];

View File

@ -3,8 +3,7 @@
% EVALUATES THE MEAN RETURN PERIOD VALUES USING THE UPPER-BOUNDED G-R LED % EVALUATES THE MEAN RETURN PERIOD VALUES USING THE UPPER-BOUNDED G-R LED
% MAGNITUDE DISTRIBUTION MODEL. % MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter % DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter
% relation leads to the upper truncated exponential distribution to model % relation leads to the upper truncated exponential distribution to model
@ -47,11 +46,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m,T]=Ret_periodGRT(Md,Mu,dM,Mmin,lamb,eps,b,Mmax) function [m,T]=Ret_periodGRT(Md,Mu,dM,Mmin,lamb,eps,b,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
if Md<Mmin; Md=Mmin;end if Md<Mmin; Md=Mmin;end
if Mu>Mmax; Mu=Mmax;end if Mu>Mmax; Mu=Mmax;end
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';

View File

@ -3,8 +3,7 @@
% EVALUATES THE MEAN RETURN PERIOD VALUES USING THE UNLIMITED G-R LED % EVALUATES THE MEAN RETURN PERIOD VALUES USING THE UNLIMITED G-R LED
% MAGNITUDE DISTRIBUTION MODEL. % MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation % DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation
% leads to the exponential distribution model of magnitude distribution % leads to the exponential distribution model of magnitude distribution
@ -42,10 +41,15 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m,T]=Ret_periodGRU(Md,Mu,dM,Mmin,lamb,eps,b) function [m,T]=Ret_periodGRU(Md,Mu,dM,Mmin,lamb,eps,b)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
if Md<Mmin; Md=Mmin;end if Md<Mmin; Md=Mmin;end
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';
beta=b*log(10); beta=b*log(10);

View File

@ -5,8 +5,7 @@
% RETURN PERIOD VALUES FOR THE UPPER-BOUNDED NONPARAMETRIC % RETURN PERIOD VALUES FOR THE UPPER-BOUNDED NONPARAMETRIC
% DISTRIBUTION FOR MAGNITUDE. % DISTRIBUTION FOR MAGNITUDE.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -55,11 +54,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m,T]=Ret_periodNPT(Md,Mu,dM,Mmin,lamb,eps,h,xx,ambd,Mmax) function [m,T]=Ret_periodNPT(Md,Mu,dM,Mmin,lamb,eps,h,xx,ambd,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
if Md<Mmin; Md=Mmin;end if Md<Mmin; Md=Mmin;end
if Mu>Mmax; Mu=Mmax;end if Mu>Mmax; Mu=Mmax;end
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';

View File

@ -4,8 +4,7 @@
% THE MEAN RETURN PERIOD VALUES FOR THE UNBOUNDED % THE MEAN RETURN PERIOD VALUES FOR THE UNBOUNDED
% NONPARAMETRIC DISTRIBUTION FOR MAGNITUDE. % NONPARAMETRIC DISTRIBUTION FOR MAGNITUDE.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -53,11 +52,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m,T]=Ret_periodNPU(Md,Mu,dM,Mmin,lamb,eps,h,xx,ambd) function [m,T]=Ret_periodNPU(Md,Mu,dM,Mmin,lamb,eps,h,xx,ambd)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
if Md<Mmin; Md=Mmin;end if Md<Mmin; Md=Mmin;end
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';
n=length(m); n=length(m);

View File

@ -3,8 +3,7 @@
% EVALUATES THE DENSITY AND CUMULATIVE DISTRIBUTION FUNCTIONS OF MAGNITUDE % EVALUATES THE DENSITY AND CUMULATIVE DISTRIBUTION FUNCTIONS OF MAGNITUDE
% UNDER THE UPPER-BOUNDED G-R LED MAGNITUDE DISTRIBUTION MODEL. % UNDER THE UPPER-BOUNDED G-R LED MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter % DESCRIPTION: The assumption on the upper-bounded Gutenberg-Richter
% relation leads to the upper truncated exponential distribution to model % relation leads to the upper truncated exponential distribution to model
@ -42,11 +41,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m, PDF_GRT, CDF_GRT]=dist_GRT(Md,Mu,dM,Mmin,eps,b,Mmax) function [m, PDF_GRT, CDF_GRT]=dist_GRT(Md,Mu,dM,Mmin,eps,b,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';
beta=b*log(10); beta=b*log(10);
mian=(1-exp(-beta*(Mmax-Mmin+eps/2))); mian=(1-exp(-beta*(Mmax-Mmin+eps/2)));

View File

@ -3,8 +3,7 @@
% EVALUATES THE DENSITY AND CUMULATIVE DISTRIBUTION FUNCTIONS OF MAGNITUDE % EVALUATES THE DENSITY AND CUMULATIVE DISTRIBUTION FUNCTIONS OF MAGNITUDE
% UNDER THE UNLIMITED G-R LED MAGNITUDE DISTRIBUTION MODEL. % UNDER THE UNLIMITED G-R LED MAGNITUDE DISTRIBUTION MODEL.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation % DESCRIPTION: The assumption on the unlimited Gutenberg-Richter relation
% leads to the exponential distribution model of magnitude distribution % leads to the exponential distribution model of magnitude distribution
@ -41,10 +40,15 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details, <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m, PDF_GRU, CDF_GRU]=dist_GRU(Md,Mu,dM,Mmin,eps,b) function [m, PDF_GRU, CDF_GRU]=dist_GRU(Md,Mu,dM,Mmin,eps,b)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';
beta=b*log(10); beta=b*log(10);
PDF_GRU=beta*exp(-beta*(m-Mmin+eps/2)); PDF_GRU=beta*exp(-beta*(m-Mmin+eps/2));

View File

@ -4,8 +4,8 @@
% AND CUMULATIVE DISTRIBUTION FUNCTIONS FOR THE UPPER-BOUNDED MAGNITUDE % AND CUMULATIVE DISTRIBUTION FUNCTIONS FOR THE UPPER-BOUNDED MAGNITUDE
% DISTRIBUTION. % DISTRIBUTION.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of %
% Sciences, Warsaw, Poland % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -51,11 +51,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details , <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m,PDF_NPT,CDF_NPT]=dist_NPT(Md,Mu,dM,Mmin,eps,h,xx,ambd,Mmax) function [m,PDF_NPT,CDF_NPT]=dist_NPT(Md,Mu,dM,Mmin,eps,h,xx,ambd,Mmax)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';
nn=length(m); nn=length(m);
@ -77,7 +82,8 @@ function [gau]=dens_npr1(y,x,ambd,h,x1)
%Nonparametric adaptive density for a variable from the interval [x1,inf) %Nonparametric adaptive density for a variable from the interval [x1,inf)
% x - the sample data doubled and sorted in the ascending order. % x - the sample data doubled and sorted in the ascending order. Use
% "podwajanie.m" first to accmoplish that.
% ambd - the local scaling factors for the adaptive estimation % ambd - the local scaling factors for the adaptive estimation
% h - the optimal smoothing factor % h - the optimal smoothing factor
% y - the value of random variable X for which the density is calculated % y - the value of random variable X for which the density is calculated

View File

@ -4,8 +4,7 @@
% AND CUMULATIVE DISTRIBUTION FUNCTIONS FOR THE UNLIMITED MAGNITUDE % AND CUMULATIVE DISTRIBUTION FUNCTIONS FOR THE UNLIMITED MAGNITUDE
% DISTRIBUTION. % DISTRIBUTION.
% %
% AUTHOR: Stanislaw. Lasocki, Institute of Geophysics Polish Academy of % AUTHOR: S. Lasocki 06/2014 within IS-EPOS project.
% Sciences, Warsaw, Poland
% %
% DESCRIPTION: The kernel estimator approach is a model-free alternative % DESCRIPTION: The kernel estimator approach is a model-free alternative
% to estimating the magnitude distribution functions. It is assumed that % to estimating the magnitude distribution functions. It is assumed that
@ -52,11 +51,16 @@
% This program is distributed in the hope that it will be useful, % This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details , <http://www.gnu.org/licenses/>. % GNU General Public License for more details.
% %
function [m, PDF_NPU, CDF_NPU]=dist_NPU(Md,Mu,dM,Mmin,eps,h,xx,ambd) function [m, PDF_NPU, CDF_NPU]=dist_NPU(Md,Mu,dM,Mmin,eps,h,xx,ambd)
% -------------- VALIDATION RULES ------------- K_21NOV2016
if dM<=0;error('Magnitude Step must be greater than 0');end
%----------------------------------------------------------
m=(Md:dM:Mu)'; m=(Md:dM:Mu)';
nn=length(m); nn=length(m);
@ -76,7 +80,8 @@ function [gau]=dens_npr1(y,x,ambd,h,x1)
%Nonparametric adaptive density for a variable from the interval [x1,inf) %Nonparametric adaptive density for a variable from the interval [x1,inf)
% x - the sample data doubled and sorted in the ascending order. % x - the sample data doubled and sorted in the ascending order. Use
% "podwajanie.m" first to accmoplish that.
% ambd - the local scaling factors for the adaptive estimation % ambd - the local scaling factors for the adaptive estimation
% h - the optimal smoothing factor % h - the optimal smoothing factor
% y - the value of random variable X for which the density is calculated % y - the value of random variable X for which the density is calculated