MATLAB: Conversion to double from memmapfile is not possible

doubleMATLABmemmapfile

Dear experts,
I keep getting the error message, "Conversion to double from memmapfile is not possible." Could anyone please suggest a solution?
Please see below for the relevant bit.
**********************************************
>> Y=SurfStatReadData( [thickfileleft, thickfileright] );
248 x 2 files to read, % remaining: 100 90 81 71 61 52 42 32 23 13 3 Done
data =
Filename: '/home/AAA/SurfStat/tp2fe01f69_6976_48ca_8574_a189843e46f1'
Writable: true
Offset: 0
Format: {'single' [81924 248] 'Data'}
Repeat: Inf
Data: 1x1 struct array with fields:
Data
>> meanthick = mean( double( Y ) );
??? Error using ==> double
Conversion to double from memmapfile is not possible.
**********************************************
Please note that "SurfStatReadData" is one of the scripts of SurfStat http://www.math.mcgill.ca/keith/surfstat/.
Thank you very much for taking the time to read my query. I would much appreciate any help.
Best wishes,
Kie Woo

Best Answer

Try mean(double( Y.Data.Data ))