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

2 次查看(过去 30 天)
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?

采纳的回答

dpb
dpb 2018-4-1
Just use ismissing on the original table.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Timetables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by