updated scripts for SSH, zero M error handling
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
% AND CUMULATIVE DISTRIBUTION FUNCTIONS FOR THE UPPER-BOUNDED MAGNITUDE
|
||||
% 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
|
||||
% 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,
|
||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
% 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)
|
||||
|
||||
% -------------- VALIDATION RULES ------------- K_21NOV2016
|
||||
if dM<=0;error('Magnitude Step must be greater than 0');end
|
||||
%----------------------------------------------------------
|
||||
|
||||
|
||||
m=(Md:dM:Mu)';
|
||||
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)
|
||||
|
||||
% 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
|
||||
% h - the optimal smoothing factor
|
||||
% y - the value of random variable X for which the density is calculated
|
||||
|
||||
Reference in New Issue
Block a user