Azzera filtri
Azzera filtri

How can I find the range of empty data in a table

2 visualizzazioni (ultimi 30 giorni)
Hi, needing some help. I want to obtain the range in wich there is empty data in a timetable. For expample:
A= [day1,1, day2, 2, day3, NaN, day4, NaN, day5,5]
if you notice the data follows a linear function, and I have already done a fill of the missing information using the function fillmissing(_,'linear'). with this I had obtained another timetable:
B = fillmissing(A,'linear');
B = [day1,1, day2, 2, day3, 3, day4, 4, day5,5]
Now I need to be able to obtain the range that I have filled. the first idea that came to me is comparing the two timetables using the function ismember(A,B) this function return a logical answer where 1 = the information exist in both tables and 0 = the information is not in both tables.
C = ismember(A,B);
C = 1,1,0,0,1
where C is logical
I need to obtain something like this:
Li=3 %inferior limit
ls=4 %superior limit
The timetable that I'm using has information of every hour of several years. Someone now about a function or have an idea of how can I solve this?

Risposta accettata

dpb
dpb il 1 Apr 2018
Just use ismissing on the original table.

Più risposte (0)

Categorie

Scopri di più su Timetables 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