Insert the date to a missing values of series of time add NaN to the result of the sensor that measures wind velocity, wind direction, pressure, global radiation and % of humidity

2 visualizzazioni (ultimi 30 giorni)
Hi, thanks a lot for help me always, you are awesome, I am using right know the matlab R2020a
now i have a problem that seems very easy but i read all the answer for this question and anyone have the same problem that me or the question is no properly answer, so... here i go.
i have a series of data with this results, i attach the excel but it look like that:
this NaN i insert manually, and you can notice from the image that the missing values are random, the sensor continue giving data without any problem, and continue to the next date like for example jump from 3:50 to 4:20 like nothing happens, actually i have to add the date manually too.
i have looked at similar questions in here, but they all seem to be a bit different
I know this is very simple but i tried with a few programs and no one works, this same problem occur for all the next years (eight years) so do it manually take me a lot of time.
Thanks a lot for you time
Best !!!!!!!!!!

Risposta accettata

Mohammad Sami
Mohammad Sami il 18 Mag 2020
If I understand your question correctly, your data has missing timestamps. You want to add these back.
I suggest you import your data as timetable and then use retime function, with the interval of 10 minutes.
TT = retime(TT,'regular','fillwithmissing','TimeStep',minutes(10));
  6 Commenti
Mohammad Sami
Mohammad Sami il 18 Mag 2020
Ok. Can you check what is the variable name you get for the minutes column after you read it on your computer. On my computer I was getting Var2. You can execute the first two lines and then open the variable for inspection.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Tables in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by