LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
toTikZ.m
1function tikzCode = toTikZ(self, options)
2% TOTIKZ Generate TikZ/LaTeX code for the network diagram
3%
4% CODE = TOTIKZ() returns a complete LaTeX document containing
5% the TikZ code that can be compiled with pdflatex.
6%
7% CODE = TOTIKZ(OPTIONS) generates with custom TikZOptions configuration.
8%
9% Example:
10% tikzCode = model.toTikZ();
11% fid = fopen('network.tex', 'w');
12% fprintf(fid, '%s', tikzCode);
13% fclose(fid);
14%
15% Copyright (c) 2012-2026, Imperial College London
16% All rights reserved.
17
18% Convert MATLAB model to Java Network
19jnetwork = JLINE.line_to_jline(self);
20
21if nargin < 2
22 tikzCode = char(jnetwork.toTikZ());
23else
24 tikzCode = char(jnetwork.toTikZ(options));
25end
26end