1 %> @brief Report base
class.
3 %> Reports are blocks that output a @ref log_report
class.
5 %> They descend from @ref
vis, but they
do generate output.
7 %> The code generator @
gencode.m will automatically open a web browser to show the report
if it is GUI-obtained.
10 %> =1 whther to generate the images
13 %> =1. Whether to create the tables
18 o.classtitle = 'HTML Report';
28 % *-*-*-*-*-*-*-* TOOLS
30 %> Creates an "img" HTML tag that links both to the PNG and FIG versions
31 %> @param fn file name with/without extension
32 %> @param perc =100 percentage width (0-100). If zero, will use original size
33 %> @param flag_fig = 1 Whether to generate an "a" tag to the FIG version
as well
34 function s = get_imgtag(fn, perc, flag_fig)
35 if nargin < 2 || isempty(perc)
38 if nargin < 3 || isempty(flag_fig)
43 [s_path, fn, s_ext] = fileparts(fn); %
#ok<NASGU,ASGLU>
45 s = [
'<center>', 10, ...
46 '<a href="', fn,
'.png" target="_blank"><img border=0 src="', fn,
'.png" ', ...
47 iif(perc > 0, [
'width="', int2str(perc),
'%"'],
''),
'></a><br />', 10];
49 s = cat(2, s, [
'<a href="', fn,
'.fig">Download FIG</a> ', 10, ...
50 '<a href="matlab:open(''', fn,
'.fig'')">Open FIG in MATLAB</a><br />', 10]);
52 s = cat(2, s, [
'</center>', 10]);
55 %> Used to save a figure both
as png and fig, and close it
56 %> @
return an
"img" HTML tag that may be used
if wanted
57 %> @param fn =(autogenerated) file name with/without extension
58 %> @param perc =100 percentage width (0-100)
59 %> @param res =(screen resolution) Resolution in DPI, e.g., 150, 300
60 function s = save_n_close(fn, perc, res)
61 if nargin < 1 || isempty(fn)
64 if nargin < 2 || isempty(perc)
71 [s_path, fn, s_ext] = fileparts(fn); %
#ok<NASGU,ASGLU>
76 pause(0.25); % Attempt to wait until MATLAB gets internally sorted
Visualization base class.
static function get_imgtag(in fn, in perc, in flag_fig)
function save_as_png(in h, in fn, in dpi)
function iif(in cond, in x1, in x2)
Analysis Session (AS) base class.
function save_as_fig(in h, in fn)
function find_filename(in prefix, in suffix, in extension, in flag_return_ext)
MATLAB code generation to create, boot, train and use blocks.