LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
LagkJointMomentsFromDMAP.m
1% Nm = LagkJointMomentsFromDMAP(D0, D1, K, L, prec)
2%
3% Returns the lag-L joint moments of a discrete Markovian
4% arrival process.
5%
6% Parameters
7% ----------
8% D0 : matrix, shape (M,M)
9% The D0 matrix of the discrete Markovian arrival process
10% D1 : matrix, shape (M,M)
11% The D1 matrix of the discrete Markovian 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] = LagkJointMomentsFromDMAP (d0, d1, K, L)
30
31 global BuToolsCheckInput;
32 if isempty(BuToolsCheckInput)
33 BuToolsCheckInput = true;
34 end
35
36 if BuToolsCheckInput && ~CheckDMAPRepresentation(d0,d1)
37 error('LagkJointMomentsFromDMAP: Input isn''t a valid DMAP representation!');
38 end
39 h{1}=d0;
40 h{2}=d1;
41
42 if ~exist('K','var')
43 K=size(h{1},1)-1;
44 end
45
46 if ~exist('L','var')
47 L=1;
48 end
49
50 mom=LagkJointMomentsFromDMRAP(h,K,L);
51 Nm=mom{1};
52end