How to deal with NaN statistical analysis?

3 次查看(过去 30 天)
First block
[cmin, indice_min]=min(IRR(:,4));
min_dia=IRR(indice_min, 1:3);
disp(min_dia)
Second block
[cmean, indice_mean]=mean(IRR(:,4), ('omitnan')); %
mean_dia=IRR(indice_mean, 2:3);
disp(mean_dia)
Dear all,
I have been analysing a dataset, whereas I have noticed that for some statistical operations such as "min", "max", and also "mode", there are not problems if datastes contains blank spaces ("NaN"), nonetheless, for "median" as well as "mean" the statistical MATLAB functions present some issues, even if I include in the code 'omitnan'. The structure portrayed at "First Block" works correctly, nevertheless, "Second block" does not work properly presenting some issues. Would you helping me with this?
I hope you can help me to cope with this problem.
Sincerely,

采纳的回答

Jonas Allgeier
Jonas Allgeier 2020-3-2
Mean only gives you a single output argument, the mean value; so requesting a second output argument will not work.
  6 个评论
Tony Castillo
Tony Castillo 2020-3-2
However, as I need a day for my analysis with mean value. I prepared this script in order to find that day. In this way I get one day with the exactly characteristics from a mean value.
cmean=mean(IRR(:,4), ('omitnan'));
[row,col]=find(IRR>=(cmean-1)&IRR<=(cmean+1), 1);
mean_dia=IRR(row, 1:3);
disp(mean_dia)

请先登录,再进行评论。

更多回答(0 个)

类别

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

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by