Test that dseries are not empty.

time-shift
Stéphane Adjemian (Charybdis) 2014-05-17 17:02:22 +02:00
parent 03250208c0
commit 1ed0ccff6f
1 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,10 @@ for i=1:number_of_variables
if ~isdseries(var)
error(['dseries::from: Variable ' current_variable ' is not a dseries object!'])
else
if ~var.vobs
msg = sprintf('dseries::from: Object %s must not be empty!\n',current_variable);
error(msg)
end
if var.vobs>1
msg = sprintf('dseries::from: Object %s must contain only one variable!\n',current_variable);
error(msg)