Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
Guillermo Renderos
Guillermo Renderos am 1 Apr. 2018
Beantwortet: dpb am 1 Apr. 2018
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?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Timetables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by