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

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
mean(double( Y.Data.Data ), 2)
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