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
Sébastien Villemot
dseries
Commits
83afdf34
Unverified
Commit
83afdf34
authored
Nov 07, 2017
by
Stéphane Adjemian
Committed by
GitHub
Nov 07, 2017
Browse files
Merge pull request #32 from abuesol08/x13forecast
Fixed problems in FORECAST output (option fvr)
parents
b167268c
0572c72a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/@x13/run.m
View file @
83afdf34
...
...
@@ -65,10 +65,18 @@ if ~all(cellfun(@isempty, struct2cell(o.forecast)))
for
i
=
1
:
length
(
savedoutput
)
if
exist
(
sprintf
(
'%s.%s'
,
basename
,
lower
(
savedoutput
{
i
})))
tmp
=
importdata
(
sprintf
(
'%s.%s'
,
basename
,
lower
(
savedoutput
{
i
})));
initdate
=
num2str
(
tmp
.
data
(
1
,
1
));
% wrong in series
t
=
o
.
y
.
dates
;
name
=
strsplit
(
tmp
.
textdata
{
1
},
'\t'
);
name
=
name
(
2
:
end
);
data
=
tmp
.
data
(:,
2
:
end
);
o
.
results
.
(
savedoutput
{
i
})
=
dseries
(
data
,
lastobservedperiod
(
o
.
y
)
+
1
,
name
);
if
isempty
(
data
)
disp
([
'x13:forecast:: Problem reading '
sprintf
(
'%s.%s'
,
basename
,
lower
(
savedoutput
{
i
}))
'. Output formatting may be incorrect!'
]);
initdate
=
tmp
.
textdata
{
3
,
1
};
o
.
results
.
(
savedoutput
{
i
})
=
dseries
(
NaN
(
length
(
tmp
.
data
),
numel
(
name
)),
dates
(
t
.
freq
,
str2num
(
initdate
(
1
:
4
)),
str2num
(
initdate
(
5
:
end
))),
name
);
else
o
.
results
.
(
savedoutput
{
i
})
=
dseries
(
data
,
dates
(
t
.
freq
,
str2num
(
initdate
(
1
:
4
)),
str2num
(
initdate
(
5
:
end
))),
name
);
end
end
end
end
...
...
Write
Preview
Markdown
is supported
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