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
691ce957
Commit
691ce957
authored
Nov 07, 2017
by
Stéphane Adjemian
Browse files
Fixed typos.
parent
544f1a4c
Changes
2
Show whitespace changes
Inline
Side-by-side
src/@dseries/mdiff_.m
View file @
691ce957
...
@@ -27,16 +27,14 @@ function o = mdiff_(o) % --*-- Unitary tests --*--
...
@@ -27,16 +27,14 @@ function o = mdiff_(o) % --*-- Unitary tests --*--
switch
frequency
(
o
)
switch
frequency
(
o
)
case
1
case
1
error
(
'dseries::
q
diff: I cannot compute monthly differences from yearly data!'
)
error
(
'dseries::
m
diff: I cannot compute monthly differences from yearly data!'
)
case
4
case
4
error
(
'dseries::
q
diff: I cannot compute monthly differences from quarterly data!'
)
error
(
'dseries::
m
diff: I cannot compute monthly differences from quarterly data!'
)
case
12
case
12
o
.
data
(
2
:
end
,:)
=
o
.
data
(
2
:
end
,:)
-
o
.
data
(
1
:
end
-
1
,:);
o
.
data
(
2
:
end
,:)
=
o
.
data
(
2
:
end
,:)
-
o
.
data
(
1
:
end
-
1
,:);
o
.
data
(
1
,:)
=
NaN
;
o
.
data
(
1
,:)
=
NaN
;
case
52
error
(
'dseries::qdiff: I do not know yet how to compute quaterly differences from monthly data!'
)
otherwise
otherwise
error
([
'dseries::
q
diff: object '
inputname
(
1
)
' has unknown frequency'
]);
error
([
'dseries::
m
diff: object '
inputname
(
1
)
' has unknown frequency'
]);
end
end
for
i
=
1
:
vobs
(
o
)
for
i
=
1
:
vobs
(
o
)
...
...
src/@dseries/mgrowth_.m
View file @
691ce957
...
@@ -27,24 +27,21 @@ function o = mgrowth_(o) % --*-- Unitary tests --*--
...
@@ -27,24 +27,21 @@ function o = mgrowth_(o) % --*-- Unitary tests --*--
switch
frequency
(
o
)
switch
frequency
(
o
)
case
1
case
1
error
(
'dseries::
q
growth: I cannot compute monthly growth rates from yearly data!'
)
error
(
'dseries::
m
growth: I cannot compute monthly growth rates from yearly data!'
)
case
4
case
4
error
(
'dseries::mgrowth: I cannot compute monthly growth rates from quaterly data!'
)
case
12
case
12
o
.
data
(
2
:
end
,:)
=
o
.
data
(
2
:
end
,:)
.
/
o
.
data
(
1
:
end
-
1
,:)
-
1
;
o
.
data
(
2
:
end
,:)
=
o
.
data
(
2
:
end
,:)
.
/
o
.
data
(
1
:
end
-
1
,:)
-
1
;
o
.
data
(
1
,:)
=
NaN
;
o
.
data
(
1
,:)
=
NaN
;
case
52
error
(
'dseries::qgrowth: I do not know yet how to compute monthly growth rates from weekly data!'
)
otherwise
otherwise
error
([
'dseries::
q
growth: object '
inputname
(
1
)
' has unknown frequency'
]);
error
([
'dseries::
m
growth: object '
inputname
(
1
)
' has unknown frequency'
]);
end
end
for
i
=
1
:
vobs
(
o
)
for
i
=
1
:
vobs
(
o
)
if
isempty
(
o
.
ops
{
i
})
if
isempty
(
o
.
ops
{
i
})
o
.
ops
(
i
)
=
{[
'm
diff
('
o
.
name
{
i
}
')'
]};
o
.
ops
(
i
)
=
{[
'm
growth
('
o
.
name
{
i
}
')'
]};
else
else
o
.
ops
(
i
)
=
{[
'm
diff
('
o
.
ops
{
i
}
')'
]};
o
.
ops
(
i
)
=
{[
'm
growth
('
o
.
ops
{
i
}
')'
]};
end
end
end
end
...
...
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