How to delete or ignore the rows with duplicate values in time
Show older comments
I have a 26400x2 table with time and numbers representing satellite IDs for every second (as in the picture, the file is too large to upload). I need to get the number of satellites in time (which I want to plot later). This should simply be the height of each vector containing 1 second. However, there are some duplicate sat IDs in each second, and I don't know how to remove them. I tried the following:
t1 = raw.UTCTime(1);
t2 = raw.UTCTime(end);
t = (t1:seconds(1):t2)';
num_sats_gps = zeros(length(t),1);
for i = 1:length(t)
idx = gps.UTCTime == t(i);
uniq = unique(gps.Svid(idx));
num_sats_gps(i,1) = height(uniq);
end
but it doesn't work like it's supposed to, the result gives me vector with 0 values. Is there any other approach to this? Any answer would be highly appreciated!

Accepted Answer
More Answers (0)
Categories
Find more on CubeSat and Satellites in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!