Commit 691ce957 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed typos.

parent 544f1a4c
...@@ -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::qdiff: I cannot compute monthly differences from yearly data!') error('dseries::mdiff: I cannot compute monthly differences from yearly data!')
case 4 case 4
error('dseries::qdiff: I cannot compute monthly differences from quarterly data!') error('dseries::mdiff: 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::qdiff: object ' inputname(1) ' has unknown frequency']); error(['dseries::mdiff: object ' inputname(1) ' has unknown frequency']);
end end
for i = 1:vobs(o) for i = 1:vobs(o)
......
...@@ -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::qgrowth: I cannot compute monthly growth rates from yearly data!') error('dseries::mgrowth: 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::qgrowth: object ' inputname(1) ' has unknown frequency']); error(['dseries::mgrowth: 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) = {['mdiff(' o.name{i} ')']}; o.ops(i) = {['mgrowth(' o.name{i} ')']};
else else
o.ops(i) = {['mdiff(' o.ops{i} ')']}; o.ops(i) = {['mgrowth(' o.ops{i} ')']};
end end
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment