LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
plot.m
1function savedfname = plot(model)
2%PLOT Export a plot of an LQN model using lqn2ps
3lastwd = pwd();
4workspaceDir = fullfile(lineRootFolder, 'workspace', 'lqns');
5cd(workspaceDir);
6
7% Generate temp name with 'tmp_' prefix
8rawname = tempname(workspaceDir);
9[parentdir, filename] = fileparts(rawname);
10fname = fullfile(parentdir, ['tmp_', filename]);
11xmlFile = [fname, '.lqnx'];
12model.writeXML(xmlFile, false);
13
14system(sprintf('lqn2ps %s', xmlFile));
15line_printf('Postscript file saved in: %s\n', [fname, '.ps']);
16
17cd(lastwd);
18savedfname = [fname, '.ps'];
19end