Add check for unique data entries in dataset

Leads to cryptic crashes if not filtered out
time-shift
Johannes Pfeifer 2015-06-08 11:16:40 +02:00
parent 41155369ac
commit 5d8da65e6d
1 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,10 @@ else
clear('dseriesobjectforuserdataset');
end
if size(unique(DynareDataset.name),1)~=size(DynareDataset.name,1)
error('makedataset: the data set must not contain two variables with the same name and must not contain empty/non-named columns.')
end
% Select a subset of the variables.
DynareDataset = DynareDataset{DynareOptions.varobs{:}};