Commit 530ad8e2 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Fix bug when datafile was changed and nobs resulting from old dataset was...

Fix bug when datafile was changed and nobs resulting from old dataset was bigger than is possible in new dataset
parent ecdbc423
......@@ -32,7 +32,7 @@ end
rawdata = read_variables(datafile,varobs,[],xls.sheet,xls.range);
% Get the (default) number of observations.
if isempty(nobs)
if isempty(nobs) || rows(rawdata)<nobs+first-1 %case 2: dataset has changed
nobs = rows(rawdata)-first+1;
end
......
Markdown is supported
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