nanmean and mean ( 'omitnan') error

조회 수: 10 (최근 30일)
Sahar khalili
Sahar khalili 2021년 7월 22일
답변: Sahar khalili 2021년 7월 22일
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