nanmean and mean ( 'omitnan') error

10 次查看(过去 30 天)
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,

采纳的回答

Simon Chan
Simon Chan 2021-7-22
use mean(cell2mat(PAR_1),'omitnan')

更多回答(1 个)

Sahar khalili
Sahar khalili 2021-7-22
Oh thanks.

类别

Help CenterFile Exchange 中查找有关 NaNs 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by