diff --git a/matlab/@ucf/ucf.m b/matlab/@ucf/ucf.m index 1958113..14a8451 100644 --- a/matlab/@ucf/ucf.m +++ b/matlab/@ucf/ucf.m @@ -170,6 +170,11 @@ classdef ucf < handle if obj.fileID<0 error('Unable to open file: %s',obj.File); end + obj.fileBeg = ftell(obj.fileID); + fseek(obj.fileID,0,'eof'); + obj.fileEnd = ftell(obj.fileID); + fseek(obj.fileID,0,'bof'); + obj.FileSize = obj.fileEnd-obj.fileBeg; % Read the file header obj.readHeaderFile() % Scan through file to get the basic structure (steps/sets) @@ -228,7 +233,9 @@ classdef ucf < handle if obj.fileID<0 error('Unable to create file: %s',obj.File); end - % + obj.fileBeg = ftell(obj.fileID); + obj.fileEnd = ftell(obj.fileID); + obj.FileSize = obj.fileEnd-obj.fileBeg; switch par.Results.type case 'field' obj.typeID = obj.typeIDmatlabField;