LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
LagkJointMomentsFromDRAP.m
1% Nm = LagkJointMomentsFromDRAP(H0, H1, K, L, prec)
2%
3% Returns the lag-L joint moments of a discrete rational
4% arrival process.
5%
6% Parameters
7% ----------
8% H0 : matrix, shape (M,M)
9% The H0 matrix of the discrete rational arrival process
10% H1 : matrix, shape (M,M)
11% The H1 matrix of the discrete rational arrival process
12% K : int, optional
13% The dimension of the matrix of joint moments to
14% compute. If K=0, the MxM joint moments will be
15% computed. The default value is 0
16% L : int, optional
17% The lag at which the joint moments are computed.
18% The default value is 1
19% prec : double, optional
20% Numerical precision to check if the input is valid.
21% The default value is 1e-14
22%
23% Returns
24% -------
25% Nm : matrix, shape(K+1,K+1)
26% The matrix containing the lag-L joint moments,
27% starting from moment 0.
28
29function [Nm] = LagkJointMomentsFromDRAP (d0, d1, K, L)
30
31 global BuToolsCheckInput;
32 if isempty(BuToolsCheckInput)
33 BuToolsCheckInput = true;
34 end
35
36 if BuToolsCheckInput && ~CheckDRAPRepresentation(d0,d1)
37 error('LagkJointMomentsFromDRAP: Input isn''t a valid DRAP representation!');
38 end
39
40 h{1}=d0;
41 h{2}=d1;
42
43 if ~exist('K','var')
44 K=size(h{1},1)-1;
45 end
46
47 if ~exist('L','var')
48 L=1;
49 end
50
51 mom=LagkJointMomentsFromDMRAP(h,K,L);
52 Nm=mom{1};
53end