Hello there
I have a matrix of (10200x7) from 01-01-2019 to 29-02-2020, which is iqual to the hourly temperature measured. The data is organizaed in the first 6 columns with date information (yy-mm-dd-hh-mm-ss) and then my temperature data (column 7). I already got the nanmean dayli values for a new matrix. But I would like to know how can I get a conditional, for example: if more than 75% of my data each 24 hours is missing, give me NaN for that day. If not, give me nanmean value.
I'm trying something like this, but I'm pretty sure I'm on the wrong way
%first I find the hourly values positions after 0 hs and before 23 hs
x = find(files_mat{1,1}(:,5)>= 0 {1,1}(:,5)<=23);
%%then, I'm trying to get the conditional to the tempearture column
if isnan (files_mat{1,1}(x,7))<= 0.75
M_24h
elseif isnan (files_mat{1,1}(x,7))>= 0.75
M_24h
Thank you
2 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/626688-if-it-is-greater-than-75-percent-missing-data#comment_1088078
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/626688-if-it-is-greater-than-75-percent-missing-data#comment_1088078
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/626688-if-it-is-greater-than-75-percent-missing-data#comment_1088338
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/626688-if-it-is-greater-than-75-percent-missing-data#comment_1088338
Sign in to comment.