Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
ed5f2a8b
Commit
ed5f2a8b
authored
Mar 15, 2013
by
Houtan Bastani
Browse files
reporting: @section: check user input
parent
5715dea1
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@section/section.m
View file @
ed5f2a8b
...
@@ -21,7 +21,6 @@ function o = section(varargin)
...
@@ -21,7 +21,6 @@ function o = section(varargin)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
o
=
struct
;
o
=
struct
;
o
.
align
=
't'
;
o
.
elements
=
elements
();
o
.
elements
=
elements
();
o
.
cols
=
1
;
o
.
cols
=
1
;
...
@@ -50,6 +49,9 @@ elseif nargin > 1
...
@@ -50,6 +49,9 @@ elseif nargin > 1
end
end
end
end
% Check options provided by user
assert
(
isint
(
o
.
cols
),
'@graph.graph: cols must be an integer'
);
% Create section object
% Create section object
o
=
class
(
o
,
'section'
);
o
=
class
(
o
,
'section'
);
end
end
matlab/reports/@section/write.m
View file @
ed5f2a8b
...
@@ -31,7 +31,6 @@ function o = write(o, fid)
...
@@ -31,7 +31,6 @@ function o = write(o, fid)
assert
(
fid
~=
-
1
);
assert
(
fid
~=
-
1
);
fprintf
(
fid
,
'%% Section Object\n'
);
fprintf
(
fid
,
'%% Section Object\n'
);
%fprintf(fid, '\\begin{table}[%shtpb]%%\n', o.align);
fprintf
(
fid
,
' \\vspace{15px}\n'
);
fprintf
(
fid
,
' \\vspace{15px}\n'
);
fprintf
(
fid
,
'\\centering\n'
);
fprintf
(
fid
,
'\\centering\n'
);
fprintf
(
fid
,
'\\noindent\\maxsizebox{\\textwidth}{!}{%%\n'
);
fprintf
(
fid
,
'\\noindent\\maxsizebox{\\textwidth}{!}{%%\n'
);
...
@@ -52,6 +51,5 @@ end
...
@@ -52,6 +51,5 @@ end
fprintf
(
fid
,
'\\end{tabular}%%\n'
);
fprintf
(
fid
,
'\\end{tabular}%%\n'
);
fprintf
(
fid
,
'}%%\n'
);
fprintf
(
fid
,
'}%%\n'
);
%fprintf(fid, '\\end{table}%%\n');
fprintf
(
fid
,
'%% End Section Object\n\n'
);
fprintf
(
fid
,
'%% End Section Object\n\n'
);
end
end
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment