Mean value in a cell array
Mostrar comentarios más antiguos
Hi!
I have a 16x8 cell (containing 6x11 cells) with the name FinalResult. I now would like to calculate the mean value of FinalResult{1:16,4}(1,2) and have tried it with
cellfun(@mean,FinalResult{1:16,4}(1,2))
but this will give me the error message "Bad cell reference operation". Where is the mistake?
Thank you in advance for any help.
Respuesta aceptada
Más respuestas (1)
Put square brackets around the cellarray contents like:
M = [FinalResult{1:16,4}]
m = mean(M,2);
Putting the square brackets converts it into a matrix.
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!