diff --git a/matlab/reporting/@graph/createGraph.m b/matlab/reporting/@graph/createGraph.m index d2c663db25aad2ab5fc39a2561a52e37670c3e9f..9874ca78f92b4703d660501b1832934abaa0f8d2 100644 --- a/matlab/reporting/@graph/createGraph.m +++ b/matlab/reporting/@graph/createGraph.m @@ -3,10 +3,10 @@ function o = createGraph(o) % Create the graph % % INPUTS -% o - Graph Object +% o [graph] graph object % % OUTPUTS -% o - Graph Object +% o [graph] graph object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@graph/display.m b/matlab/reporting/@graph/display.m index 71c2b2ea257f3a8b942609014cb25dcfd8738ea1..7938abb45b04f4b9d181222d344b9c1a3abdc1e5 100644 --- a/matlab/reporting/@graph/display.m +++ b/matlab/reporting/@graph/display.m @@ -3,7 +3,7 @@ function display(o) % Display a Graph object % % INPUTS -% none +% o [graph] graph object % % OUTPUTS % none diff --git a/matlab/reporting/@graph/graph.m b/matlab/reporting/@graph/graph.m index b8a73374e4bdd8f4dd951cdc4f114dc1d7a8dd88..1836ac9c3c25bb84463afcd1900cc412098f0a45 100644 --- a/matlab/reporting/@graph/graph.m +++ b/matlab/reporting/@graph/graph.m @@ -3,11 +3,13 @@ function o = graph(varargin) % Graph Class Constructor % % INPUTS -% 0 args => empty graph -% 1 arg (graph class) => copy object +% varargin 0 args : empty graph object +% 1 arg : must be graph object (return a copy of arg) +% > 1 args: option/value pairs (see structure below for +% options) % % OUTPUTS -% none +% o [graph] graph object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@graph/write.m b/matlab/reporting/@graph/write.m index aecf8ab08d39e307b51c0ed94e828f02e617c770..7eb10c731296667b1bae37dab6399f44557e859c 100644 --- a/matlab/reporting/@graph/write.m +++ b/matlab/reporting/@graph/write.m @@ -3,10 +3,11 @@ function o = write(o, fid) % Write a Graph object % % INPUTS -% fid - int, file id +% o [graph] graph object +% fid [integer] file id % % OUTPUTS -% o - this +% o [graph] graph object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@pages/addPage.m b/matlab/reporting/@pages/addPage.m index 174d39b23de987512d171e60a705a2a09dbb0c33..e248cba7a9352e036c2775a1e777734d9a55d6b1 100644 --- a/matlab/reporting/@pages/addPage.m +++ b/matlab/reporting/@pages/addPage.m @@ -19,10 +19,4 @@ function ps = addPage(ps, varargin) % along with Dynare. If not, see <http://www.gnu.org/licenses/>. ps.objArray = ps.objArray.addObj(page(varargin{:})); -%assert(nargin >= 1 && nargin <= 3) -%if nargin == 1 -% ps.objArray = ps.objArray.addObj(page()); -%else -% ps.objArray = ps.objArray.addObj(varargin{:}); -%end end \ No newline at end of file diff --git a/matlab/reporting/@report/addGraph.m b/matlab/reporting/@report/addGraph.m index 37ced6625c72a14846a496953aa18b563ccd3414..a9b247b32a13f4847015d01f547f8f207bd8d261 100644 --- a/matlab/reporting/@report/addGraph.m +++ b/matlab/reporting/@report/addGraph.m @@ -1,13 +1,13 @@ function o = addGraph(o, varargin) %function o = addGraph(o, varargin) -% Add a section to the current page in the current report +% Add a graph to the current section of the current page in the report % % INPUTS -% o - report object -% varargin - arguments to @section/addGraph.m +% o [report] report object +% varargin arguments to @section/addGraph.m % % OUTPUTS -% o - updated report object +% o [report] updated report object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@report/addPage.m b/matlab/reporting/@report/addPage.m index f5f2c2468f93f0a8b1383283ff891dfac9b9bd2b..0f65bead4f1932ec4698a63c03ed9f8865e77e2c 100644 --- a/matlab/reporting/@report/addPage.m +++ b/matlab/reporting/@report/addPage.m @@ -1,14 +1,13 @@ function o = addPage(o, varargin) %function o = addPage(o, varargin) -% Add a page to the Cell Array of pages in the report +% Add a page to the report % % INPUTS -% 1 args => add empty page -% 2 args => add given page -% 3 args => add page at index +% o [report] report object +% varargin arguments to @section/addGraph.m % % OUTPUTS -% updated report object +% o [report] updated report object % % SPECIAL REQUIREMENTS % none @@ -30,22 +29,6 @@ function o = addPage(o, varargin) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -%assert(nargin >= 1 && nargin <= 3, ['incorrect number of arguments passed ' ... -% 'to addPage']); -%assert(isa(r, 'report'), 'First argument must be a report object'); -%if nargin > 1 -% assert(isa(varargin{1},'page'), ['Optional 2nd arg to addPage must be a ' ... -% 'Page']); -% if nargin > 2 -% assert(isnumeric(varargin{2}), ['Optional 3rd arg to addPage must be ' ... -% 'an index']); -% end -%end - -if nargin == 1 - o.pages = o.pages.addPage('orientation', o.orientation, 'paper', o.paper); -else - o.pages = o.pages.addPage('orientation', o.orientation, 'paper', ... - o.paper, varargin{:}); -end +o.pages = o.pages.addPage('orientation', o.orientation, 'paper', o.paper, ... + varargin{:}); end diff --git a/matlab/reporting/@report/addSection.m b/matlab/reporting/@report/addSection.m index fabc7a191b5bcbba9c79b7abe7b969f6c645483a..a0667a5ec28c261a032706135aecaf61c5fbfca5 100644 --- a/matlab/reporting/@report/addSection.m +++ b/matlab/reporting/@report/addSection.m @@ -1,13 +1,13 @@ function o = addSection(o, varargin) %function o = addSection(o, varargin) -% Add a section to the current page in the current report +% Add a section to the current page in the report % % INPUTS -% o - report object -% varargin - arguments to @page/addSection.m +% o [report] report object +% varargin arguments to @section/addGraph.m % % OUTPUTS -% o - updated report object +% o [report] updated report object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@report/addTable.m b/matlab/reporting/@report/addTable.m index 7257aa5ac163946b6b3e313a309565bb43197918..15199b4bd6f0d61ddef4a1e67354d58a32a0bd76 100644 --- a/matlab/reporting/@report/addTable.m +++ b/matlab/reporting/@report/addTable.m @@ -1,13 +1,13 @@ function o = addTable(o, varargin) %function o = addTable(o, varargin) -% Add a section to the current page in the current report +% Add a table to the current section of the current page in the report % % INPUTS -% o - report object -% varargin - arguments to @section/addTable.m +% o [report] report object +% varargin arguments to @section/addTable.m % % OUTPUTS -% o - updated report object +% o [report] updated report object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@report/display.m b/matlab/reporting/@report/display.m index 5c1f4714817ded2fed5d8ea734c0fa0e7699721e..60c3f11f4a213ee9c65fc6033f3a8603f0dee43b 100644 --- a/matlab/reporting/@report/display.m +++ b/matlab/reporting/@report/display.m @@ -3,7 +3,7 @@ function display(o) % Display a Report object % % INPUTS -% none +% o [report] report object % % OUTPUTS % none diff --git a/matlab/reporting/@report/numPages.m b/matlab/reporting/@report/numPages.m index 27bc12ed0d0264bb2dee9e2b6a907f53cdf31961..5863c55e1d0846a5fe8183d793c1835d07208c4a 100644 --- a/matlab/reporting/@report/numPages.m +++ b/matlab/reporting/@report/numPages.m @@ -1,12 +1,12 @@ -function np = numPages(r) -%function np = numPages(r) +function n = numPages(o) +%function n = numPages(o) % return the number of pages currently in the report % % INPUTS -% none +% o [report] report object % % OUTPUTS -% none +% n [integer] number of pages in the report object % % SPECIAL REQUIREMENTS % none @@ -28,5 +28,5 @@ function np = numPages(r) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -np = r.pages.numPages(); +n = o.pages.numPages(); end \ No newline at end of file diff --git a/matlab/reporting/@report/private/validateOrientation.m b/matlab/reporting/@report/private/validateOrientation.m index 98683c36cc2d80f306df56096e24b1541da59724..41bf58eed175cb8ef7262e69e970b27db29963c0 100644 --- a/matlab/reporting/@report/private/validateOrientation.m +++ b/matlab/reporting/@report/private/validateOrientation.m @@ -3,10 +3,10 @@ function validateOrientation(orientation) % Validate orientation string % % INPUTS -% char : the orientation +% orientation [char] orientation (one of 'portrait' or 'landscape') % % OUTPUTS -% char : lowercase orientation +% none % % SPECIAL REQUIREMENTS % none @@ -29,5 +29,6 @@ function validateOrientation(orientation) % along with Dynare. If not, see <http://www.gnu.org/licenses/>. assert(any(strcmpi(orientation, {'portrait', 'landscape'})), ['Valid ' ... - 'orientation arguments are: ''portrait'' and ''landscape''.']); + 'orientation arguments are: ''portrait'' and ' ... + '''landscape''.']); end \ No newline at end of file diff --git a/matlab/reporting/@report/private/validatePaper.m b/matlab/reporting/@report/private/validatePaper.m index 0395db76f3ccdf4c27d97e9d6131aff097e0cf57..73b6bb367df477729cfd0af99c7ece11ca1fddee 100644 --- a/matlab/reporting/@report/private/validatePaper.m +++ b/matlab/reporting/@report/private/validatePaper.m @@ -3,10 +3,10 @@ function validatePaper(paper) % Validate paper string % % INPUTS -% char : paper size +% paper [char] valid LaTeX paper type % % OUTPUTS -% char : lowercase paper +% none % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@report/report.m b/matlab/reporting/@report/report.m index 77f3faa90999a232758d2b67c96e81e505621ead..62cedefbb5c1df21ee0eeb888ec66f1d22bb9e4f 100644 --- a/matlab/reporting/@report/report.m +++ b/matlab/reporting/@report/report.m @@ -3,11 +3,12 @@ function o = report(varargin) % Report Class Constructor % % INPUTS -% 1 report class object => make a copy -% Otherwise, option/value pairs (see structure below for options) +% varargin 0 args : empty report object +% 1 arg : must be report object (return a copy of arg) +% > 1 args: option/value pairs (see structure below for options) % % OUTPUTS -% none +% o [report] report object % % SPECIAL REQUIREMENTS % none diff --git a/matlab/reporting/@report/write.m b/matlab/reporting/@report/write.m index 21496e2e991376cb662f0c0a6af7a3cae9325603..39b965f19cd383138b326e91692d42eaa1f4b520 100644 --- a/matlab/reporting/@report/write.m +++ b/matlab/reporting/@report/write.m @@ -3,10 +3,10 @@ function o = write(o) % Write Report object % % INPUTS -% o - Report Object +% o [report] report object % % OUTPUTS -% o - Report Object +% o [report] report object % % SPECIAL REQUIREMENTS % none