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

 採用された回答

Walter Roberson
Walter Roberson 2012 年 7 月 27 日

1 投票

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

4 件のコメント

Kie Woo
Kie Woo 2012 年 7 月 27 日
Thank you very much! That worked!
Kie Woo
Kie Woo 2012 年 7 月 28 日
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
Walter Roberson
Walter Roberson 2012 年 7 月 28 日
mean(double( Y.Data.Data ), 2)
Kie Woo
Kie Woo 2012 年 7 月 29 日
Thank you so much again. It worked!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by