EMPDISTR Computes and plots the empirical CDF and optionally compares it with distribution G. CALL: F = empdistr(X,G,plotflag,sym); F = empirical distribution of X, two column matrix. X = data vector. G = cdf, two column matrix (optional). plotflag = 0 no plotting 1 plot cdf F(x) (default) 2 plot 1-F(x) on a semilog y-scale 3 plot 1-F(x) on a log log scale sym = {s1,s2} cell array or comma separated list of plot symbols for F and G, respectively. (default {'b','r--'}) NOTE: SYM can be given anywhere after X Example: R = wgevrnd(.8,1,11,1,100); x = linspace(5,15,200); empdistr(R,[x;wgevcdf(x,.8,1,11)]','g') See also cumtrapz, cempdistr
Computes and plots the conditional empirical CDF | |
Display message and abort function. |
% CHAPTER3 Demonstrates distributions of wave characteristics | |
% CHAPTER5 contains the commands used in Chapter 5 of the tutorial | |
Estimate transformation, g, from data. | |
Probability of exceeding H: Model (dash); data (dots) | |
Probability of exceeding V: Model (dash); data (dots) | |
Parameter estimates for Beta data. | |
Parameter estimates for Chi squared data. | |
Parameter estimates for Exponential data. | |
Plots data on a Exponential distribution paper | |
Parameter estimates for Gamma data. | |
Parameter estimates for GEV data | |
Parameter estimates for Generalized Gamma data. | |
Parameter estimates for Generalized Pareto data | |
Parameter estimates for Gumbel data. | |
Plots data on a Gumbel distribution paper. | |
Parameter estimates for Inverse Gaussian data. | |
Parameter estimates for Lognormal data. | |
Parameter estimates for Normal data. | |
Parameter estimates for Rayleigh data. | |
Plots data on a Rayleigh distribution paper | |
Parameter estimates for Student's T data. | |
Parameter estimates for Truncated Rayleigh data. | |
Parameter estimates for truncated Weibull data. | |
Parameter estimates for Weibull data. | |
Plots data on a Weibull distribution paper |
001 function [Fz] = empdistr(z,varargin) 002 %EMPDISTR Computes and plots the empirical CDF 003 % and optionally compares it with distribution G. 004 % 005 % CALL: F = empdistr(X,G,plotflag,sym); 006 % 007 % F = empirical distribution of X, two column matrix. 008 % X = data vector. 009 % G = cdf, two column matrix (optional). 010 % plotflag = 0 no plotting 011 % 1 plot cdf F(x) (default) 012 % 2 plot 1-F(x) on a semilog y-scale 013 % 3 plot 1-F(x) on a log log scale 014 % sym = {s1,s2} cell array or comma separated list of plot 015 % symbols for F and G, respectively. 016 % (default {'b','r--'}) 017 % 018 % NOTE: SYM can be given anywhere after X 019 % 020 % Example: 021 % R = wgevrnd(.8,1,11,1,100); 022 % x = linspace(5,15,200); 023 % empdistr(R,[x;wgevcdf(x,.8,1,11)]','g') 024 % 025 % See also cumtrapz, cempdistr 026 027 % Tested on: Matlab 5.3, 5.2, 5.1 028 % History: 029 % revised pab 25.10.2000 030 % - made call to cempdistr instead -> making maintainence easier. 031 % revised pab 07.03.2000 032 % - enabled so that f may be empty while plotflag is given 033 % modified by Per A. Brodtkorb 10.11.98 034 % to accept both pdf and cdf's. Also enabled new plotting features, 035 % plotting of probability of exceedances on a semilogy paper .... 036 % revised ms 13.06.2000 037 % - pdf usage removed (can't distinguish between a cdf and an increasing pdf) 038 % - changed axis labelling in figures 039 % - changed to staircaseplot when plotflag=2,3 040 % - revised header info 041 % - moved the conditional version to cempdistr 042 043 044 error(nargchk(1,5,nargin)) 045 Fz1 = cempdistr(z,-inf,varargin{:}); 046 if nargout>0 047 Fz=Fz1; 048 end 049 return 050 051 052 053 054 055 056 057 058
Comments or corrections to the WAFO group