nanmean and mean ( 'omitnan') error

6 visualizaciones (últimos 30 días)
Sahar khalili
Sahar khalili el 22 de Jul. de 2021
Respondida: Sahar khalili el 22 de Jul. de 2021
Hi all,
I have a question, I have a data set like this
I replace empty cells with nan and then I try to use nanmean and also mean (PAR_1, 'omitnan'), but I face this error anyway:
Error using sum
Invalid data type. First argument must be numeric or logical.
Does anybody know how can I solve this?
Thanks,

Respuesta aceptada

Simon Chan
Simon Chan el 22 de Jul. de 2021
use mean(cell2mat(PAR_1),'omitnan')

Más respuestas (1)

Sahar khalili
Sahar khalili el 22 de Jul. de 2021
Oh thanks.

Categorías

Más información sobre NaNs en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by