How to remove common row elements from matrix
2 次查看(过去 30 天)
显示 更早的评论
Hello:
I have large number of arrays with mix of NaNs & numbers, for example:
NaN NaN NaN NaN NaN NaN 1973 1 15 1973 4 14 90
1979 11 3 12 22 10 1979 11 25 1980 1 5 64
1980 4 15 1 2 1 1980 4 17 1980 5 17 33
2017 10 23 5 7 2 2017 10 30 2018 6 10 231
NaN NaN NaN NaN NaN NaN 2018 1 23 2018 7 21 180
NaN NaN NaN NaN NaN NaN 2018 6 14 2018 7 21 38
2018 10 2 17 22 5 2018 10 24 2018 12 31 91
I need to identify the row-wise common datetime elements, for example, rows 5 and 6 here, where Year-month-day of cols. 10-12 are common. My desired output would be identify such common rows from each iteration and delete that particular row. For example, desired output here would be:
Nan NaN NaN NaN NaN NaN 1973 1 15 1973 4 14 90
1979 11 3 12 22 10 1979 11 25 1980 1 5 64
1980 4 15 1 2 1 1980 4 17 1980 5 17 33
2017 10 23 5 7 2 2017 10 30 2018 6 10 231
NaN NaN NaN NaN NaN NaN 2018 1 23 2018 7 21 180
2018 10 2 17 22 5 2018 10 24 2018 12 31 91
Any suggestions how to automate this operation?
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!