delete repeated times from matrix

3 ビュー (過去 30 日間)
Heidi Hirsh
Heidi Hirsh 2019 年 7 月 19 日
回答済み: Walter Roberson 2019 年 7 月 19 日
Hello! I have a matrix of times and irradiance values. It seems that some of the times (itime) must be duplicates.
length(unique(itime)) = 44850
length(itime) = 44858
I would like to find those 8 times that are not unique and remove the repeated times and the corresponding irradiance value (irrad). I don't want to keep any time that is repeated since there is no way to determine the correct irradiance value for the timestamp. I've attached the mat file with itime and irrad if that helps.
Thank you!

採用された回答

Walter Roberson
Walter Roberson 2019 年 7 月 19 日
[unique_itime, Aidx] = unique(itime, 'stable');
corresponding_irrad = irrad(Aidx);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by