Detect NaN from table

122 visualizzazioni (ultimi 30 giorni)
Daphne PARLIARI il 24 Mag 2021
Commentato: Daphne PARLIARI il 24 Mag 2021
Hello! I would like your help on my issue.
I have an excel file (see attached) that contains daily pollution data from 2006-2016. For the columns B to H I would like to find NaN values for each column, sum them, and in the end, store all these in a new table.
So far I have done this for column B:
[ii jj] = find(isnan(MoT20062016S1.SO2gm3));
outij = sortrows([ii jj]);
How can I expand outij to include columns C to H?
Thanks in advance!
PS. I'm on R2019a

Risposte (1)

KSSV il 24 Mag 2021
A = [1 2 NaN 5 NaN] ;
idx = isnan(A) ;
  5 Commenti
Daphne PARLIARI il 24 Mag 2021
Let me explain it this way:
Ideally, I want a table (see outij.xlsx attached) that will contain the 7 columns I want to assess, and each column will have saved the positions where a NaN was detected.
E.g. For SO2, the first NaN was detected at place 201 of the original table, the second NaN at position 202 etc.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by