Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
a6043e10
Commit
a6043e10
authored
11 years ago
by
Houtan Bastani
Browse files
Options
Downloads
Patches
Plain Diff
reporting: fix name of function in error messages
parent
661d900f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/reports/@report_series/writeSeriesForGraph.m
+9
-9
9 additions, 9 deletions
matlab/reports/@report_series/writeSeriesForGraph.m
matlab/reports/@report_series/writeSeriesForTable.m
+11
-11
11 additions, 11 deletions
matlab/reports/@report_series/writeSeriesForTable.m
with
20 additions
and
20 deletions
matlab/reports/@report_series/writeSeriesForGraph.m
+
9
−
9
View file @
a6043e10
...
...
@@ -30,7 +30,7 @@ function o = writeSeriesForGraph(o, fid, xrange)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
%% Validate options provided by user
assert
(
~
isempty
(
o
.
data
)
&&
isa
(
o
.
data
,
'dseries'
),
[
'@report_series.write
Line
: must '
...
assert
(
~
isempty
(
o
.
data
)
&&
isa
(
o
.
data
,
'dseries'
),
[
'@report_series.write
SeriesForGraph
: must '
...
'provide data as a dseries'
]);
% Line
...
...
@@ -38,10 +38,10 @@ valid_graphLineColor = {'red', 'green', 'blue', 'cyan ', 'magenta', 'yellow', ..
'black'
,
'gray'
,
'darkgray'
,
'lightgray'
,
'brown'
,
...
'lime'
,
'olive'
,
'orange'
,
'pink'
,
'purple'
,
'teal'
,
'violet'
,
'white'
};
assert
(
any
(
strcmp
(
o
.
graphLineColor
,
valid_graphLineColor
)),
...
[
'@report_series.write
Line
: graphLineColor must be one of '
strjoin
(
valid_graphLineColor
)]);
assert
(
ischar
(
o
.
graphLineStyle
),
'@report_series.write
Line
: graphLineStyle must be a string'
);
[
'@report_series.write
SeriesForGraph
: graphLineColor must be one of '
strjoin
(
valid_graphLineColor
)]);
assert
(
ischar
(
o
.
graphLineStyle
),
'@report_series.write
SeriesForGraph
: graphLineStyle must be a string'
);
assert
(
isfloat
(
o
.
graphLineWidth
)
&&
o
.
graphLineWidth
>
0
,
...
'@report_series.write
Line
: graphLineWidth must be a positive number'
);
'@report_series.write
SeriesForGraph
: graphLineWidth must be a positive number'
);
% GraphMarker
valid_graphMarker
=
{
'x'
,
'+'
,
'-'
,
'|'
,
'o'
,
'asterisk'
,
'star'
,
'10-pointed star'
,
'oplus'
,
...
...
...
@@ -50,15 +50,15 @@ valid_graphMarker = {'x', '+', '-', '|', 'o', 'asterisk', 'star', '10-pointed st
'halfsquare left*'
,
'Mercedes star'
,
'Mercedes star flipped'
,
'halfcircle'
,
...
'halfcircle*'
,
'pentagon'
,
'pentagon star'
};
assert
(
isempty
(
o
.
graphMarker
)
||
any
(
strcmp
(
o
.
graphMarker
,
valid_graphMarker
)),
...
[
'@report_series.write
Line
: graphMarker must be one of '
strjoin
(
valid_graphMarker
)]);
[
'@report_series.write
SeriesForGraph
: graphMarker must be one of '
strjoin
(
valid_graphMarker
)]);
assert
(
ischar
(
o
.
graphMarkerEdgeColor
),
'@report_series.write
Line
: graphMarkerEdgeColor must be a string'
);
assert
(
ischar
(
o
.
graphMarkerFaceColor
),
'@report_series.write
Line
: graphMarkerFaceColor must be a string'
);
assert
(
ischar
(
o
.
graphMarkerEdgeColor
),
'@report_series.write
SeriesForGraph
: graphMarkerEdgeColor must be a string'
);
assert
(
ischar
(
o
.
graphMarkerFaceColor
),
'@report_series.write
SeriesForGraph
: graphMarkerFaceColor must be a string'
);
assert
(
isfloat
(
o
.
graphMarkerSize
)
&&
o
.
graphMarkerSize
>
0
,
...
'@report_series.write
Line
: graphMarkerSize must be a positive number'
);
'@report_series.write
SeriesForGraph
: graphMarkerSize must be a positive number'
);
% Marker & Line
assert
(
~
(
strcmp
(
o
.
graphLineStyle
,
'none'
)
&&
isempty
(
o
.
graphMarker
)),
[
'@report_series.write
Line
: '
...
assert
(
~
(
strcmp
(
o
.
graphLineStyle
,
'none'
)
&&
isempty
(
o
.
graphMarker
)),
[
'@report_series.write
SeriesForGraph
: '
...
'you must provide at least one of graphLineStyle and graphMarker'
]);
% Validate xrange
...
...
This diff is collapsed.
Click to expand it.
matlab/reports/@report_series/writeSeriesForTable.m
+
11
−
11
View file @
a6043e10
...
...
@@ -40,26 +40,26 @@ end
assert
(
isint
(
precision
));
%% Validate options provided by user
assert
(
ischar
(
o
.
tableSubSectionHeader
),
'@report_series.write: tableSubSectionHeader must be a string'
);
assert
(
ischar
(
o
.
tableSubSectionHeader
),
'@report_series.write
SeriesForTable
: tableSubSectionHeader must be a string'
);
if
isempty
(
o
.
tableSubSectionHeader
)
assert
(
~
isempty
(
o
.
data
)
&&
isa
(
o
.
data
,
'dseries'
),
...
'@report_series.write: must provide data as a dseries'
);
'@report_series.write
SeriesForTable
: must provide data as a dseries'
);
if
~
isempty
(
o
.
tableDataRhs
)
assert
(
~
isempty
(
o
.
tableDataRhs
)
&&
isa
(
o
.
tableDataRhs
,
'dseries'
),
...
'@report_series.write: must provide tableDataRhs as a dseries'
);
'@report_series.write
SeriesForTable
: must provide tableDataRhs as a dseries'
);
assert
(
iscell
(
dates
)
&&
length
(
dates
)
==
2
,
...
'@report_series.write: must provide second range with tableDataRhs'
);
'@report_series.write
SeriesForTable
: must provide second range with tableDataRhs'
);
end
end
assert
(
ischar
(
o
.
tableNegColor
),
'@report_series.write: tableNegColor must be a string'
);
assert
(
ischar
(
o
.
tablePosColor
),
'@report_series.write: tablePosColor must be a string'
);
assert
(
ischar
(
o
.
tableRowColor
),
'@report_series.write: tableRowColor must be a string'
);
assert
(
isint
(
o
.
tableRowIndent
),
'@report_series.write: tableRowIndent must be an integer'
);
assert
(
islogical
(
o
.
tableShowMarkers
),
'@report_series.write: tableShowMarkers must be true or false'
);
assert
(
islogical
(
o
.
tableAlignRight
),
'@report_series.write: tableAlignRight must be true or false'
);
assert
(
isfloat
(
o
.
tableMarkerLimit
),
'@report_series
,
write: tableMarkerLimit must be a float'
);
assert
(
ischar
(
o
.
tableNegColor
),
'@report_series.write
SeriesForTable
: tableNegColor must be a string'
);
assert
(
ischar
(
o
.
tablePosColor
),
'@report_series.write
SeriesForTable
: tablePosColor must be a string'
);
assert
(
ischar
(
o
.
tableRowColor
),
'@report_series.write
SeriesForTable
: tableRowColor must be a string'
);
assert
(
isint
(
o
.
tableRowIndent
),
'@report_series.write
SeriesForTable
: tableRowIndent must be an integer'
);
assert
(
islogical
(
o
.
tableShowMarkers
),
'@report_series.write
SeriesForTable
: tableShowMarkers must be true or false'
);
assert
(
islogical
(
o
.
tableAlignRight
),
'@report_series.write
SeriesForTable
: tableAlignRight must be true or false'
);
assert
(
isfloat
(
o
.
tableMarkerLimit
),
'@report_series
.
write
SeriesForTable
: tableMarkerLimit must be a float'
);
%% Write Output
fprintf
(
fid
,
'%% Table Row (report_series)\n'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment