Skip to content
Snippets Groups Projects
Commit dc94022b authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Test that dseries are not empty.

parent 74245613
Branches
No related tags found
No related merge requests found
...@@ -154,6 +154,10 @@ for i=1:number_of_variables ...@@ -154,6 +154,10 @@ for i=1:number_of_variables
if ~isdseries(var) if ~isdseries(var)
error(['dseries::from: Variable ' current_variable ' is not a dseries object!']) error(['dseries::from: Variable ' current_variable ' is not a dseries object!'])
else else
if ~var.vobs
msg = sprintf('dseries::from: Object %s must not be empty!\n',current_variable);
error(msg)
end
if var.vobs>1 if var.vobs>1
msg = sprintf('dseries::from: Object %s must contain only one variable!\n',current_variable); msg = sprintf('dseries::from: Object %s must contain only one variable!\n',current_variable);
error(msg) error(msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment