WEIB2DPRB returns the probability for rectangular regions. CALL: [P tol] = weib2dprb(phat,x1lo,x1up,x2lo,x2up); P = probability tol = absolute tolerance, i.e., abs(int-intold) phat = parameter vectr (see weib2dfit) xilo = lower integration limits xiup = upper integration limits The size of P is the common size of XILO and XIUP. Example x1=linspace(0,10)'; phat = [ 1 2 .5 1.5 .8]; weib2dprb(phat,1,2,1,2) f = weib2dpdf2(x1,x1,phat); pdfplot(f); hold on, plot([ 1 1 2 2 1],[1 2 2 1 1]), hold off See also dist2dfit dist2drnd dist2dpdf dist2dcdf
Numerically evaluates a 2D integral using Gauss quadrature. | |
Display message and abort function. | |
Convert numeric array into cell array. |
001 function [y ,eps1] = weib2dprb(phat,x1lo,x1up,x2lo,x2up) 002 %WEIB2DPRB returns the probability for rectangular regions. 003 % 004 % CALL: [P tol] = weib2dprb(phat,x1lo,x1up,x2lo,x2up); 005 % 006 % P = probability 007 % tol = absolute tolerance, i.e., abs(int-intold) 008 % phat = parameter vectr (see weib2dfit) 009 % xilo = lower integration limits 010 % xiup = upper integration limits 011 % 012 % The size of P is the common size of XILO and XIUP. 013 % 014 % Example 015 % x1=linspace(0,10)'; 016 % phat = [ 1 2 .5 1.5 .8]; 017 % weib2dprb(phat,1,2,1,2) 018 % f = weib2dpdf2(x1,x1,phat); 019 % pdfplot(f); hold on, 020 % plot([ 1 1 2 2 1],[1 2 2 1 1]), hold off 021 % 022 % See also dist2dfit dist2drnd dist2dpdf dist2dcdf 023 024 025 % tested on: matlab 5.2 026 % history: 027 % revised pab 27.10.2000 028 % - added example text 029 % Per A. Brodtkorb 28.10.98 030 031 error(nargchk(5,5,nargin)) 032 if length(phat)~=5, error('phat must have 5 elements'),end 033 eps2=1e-5;%relative tolerance 034 % nit toolbox function 035 ph=num2cell(phat(:)',1); 036 [y eps1] = gaussq2d('weib2dpdf',x1lo,x1up,x2lo,x2up,eps2,ph{:}); 037 038 039
Comments or corrections to the WAFO group