Conversion to double from memmapfile is not possible

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

 采纳的回答

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

4 个评论

Thank you very much! That worked!
Dear Walter Roberson,
Thank you very much again for your answer. May I ask for a further solution, though?
The dimension of the variable seems to be 81924 x 248, and the solution you suggested has produced 248 means.
But, would it be possible to get 81924 means as well?
I appreciate your considering my request again. I would be very grateful for your further help.
Kie Woo
Thank you so much again. It worked!

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by