Added a test for the number of variables in the data file.
parent
c111fc1847
commit
9c0e559e30
|
@ -45,6 +45,16 @@ dataset_.info.ntobs = nobs;
|
||||||
dataset_.info.nvobs = rows(varobs);
|
dataset_.info.nvobs = rows(varobs);
|
||||||
dataset_.info.varobs = 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),:);
|
rawdata = rawdata(first:(first+dataset_.info.ntobs-1),:);
|
||||||
|
|
||||||
% Take the log (or anything else) of the variables if needed
|
% Take the log (or anything else) of the variables if needed
|
||||||
|
|
Loading…
Reference in New Issue