Commit 9c0e559e authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Added a test for the number of variables in the data file.

parent c111fc18
......@@ -45,6 +45,16 @@ dataset_.info.ntobs = nobs;
dataset_.info.nvobs = rows(varobs);
dataset_.info.varobs = varobs;
% Test the number of variables in the database.
if dataset_.info.nvobs-size(rawdata,2)
disp(' ')
disp(['Declared number of observed variables = ' int2str(dataset.info.nvobs)])
disp(['Number of variables in the database = ' int2str(size(rawdata,2))])
disp(' ')
error(['Estimation can''t take place because the declared number of observed' ...
'variables doesn''t match the number of variables in the database.'])
end
rawdata = rawdata(first:(first+dataset_.info.ntobs-1),:);
% Take the log (or anything else) of the variables if needed
......
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