LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
ImageFromMAP.m
1% ImageFromMAP(D0, D1, outFileName, prec)
2%
3% Depicts the given Markovian arrival process, and either
4% displays it or saves it to file.
5%
6% Parameters
7% ----------
8% D0 : matrix, shape (M,M)
9% The D0 matrix of the Markovian arrival process
10% D1 : matrix, shape (M,M)
11% The D1 matrix of the Markovian arrival process
12% outFileName : string, optional
13% If it is not provided, or equals to 'display', the
14% image is displayed on the screen, otherwise it is
15% written to the file. The file format is deduced
16% from the file name.
17% prec : double, optional
18% Transition rates less then prec are considered to
19% be zero and are left out from the image. The
20% default value is 1e-13.
21%
22% Notes
23% -----
24% The 'graphviz' software must be installed and available
25% in the path to use this feature.
26
27function ImageFromMAP(D0,D1,outFileName,prec)
28
29 global BuToolsCheckInput;
30 if isempty(BuToolsCheckInput)
31 BuToolsCheckInput = true;
32 end
33
34 if BuToolsCheckInput && ~CheckMAPRepresentation(D0,D1)
35 error('ImageFromMAP: Input isn''t a valid MAP representation!');
36 end
37
38 if ~exist('prec','var')
39 prec = 1e-13;
40 end
41
42 if ~exist('outFileName','var')
43 outFileName = 'display';
44 end
45
46 ImageFromMMAP({D0,D1},outFileName,prec);
47end
48