Commit 92679a46 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Check that the second input is a dseries object in @dseries/merge.

parent 4a2a9af0
......@@ -40,6 +40,10 @@ function A = merge(B,C) % --*-- Unitary tests --*--
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if ~isa(C,'dseries')
error('dseries::merge: Both inputs must be dseries objects!')
end
if ~isequal(B.freq,C.freq)
error(['dseries::merge: Cannot merge ' inputname(1) ' and ' inputname(2) ' (frequencies are different)!'])
end
......@@ -87,7 +91,7 @@ else
A.init = B.init;
end
A.time = A.init:A.init+(A.nobs-1);
A.dates = A.init:A.init+(A.nobs-1);
%@test:1
%$ % Define a datasets.
......
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