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

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 27 Jul. 2012

1 Stimme

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

4 Kommentare

Kie Woo
Kie Woo am 27 Jul. 2012
Thank you very much! That worked!
Kie Woo
Kie Woo am 28 Jul. 2012
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)
Kie Woo
Kie Woo am 29 Jul. 2012
Thank you so much again. It worked!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by