Properties
Category
English
Similar Topics
Statistics
Comments
2
Participants
2
Subscribers
0
Votes
2
Views
1123
Share
Answered
Hello,
In a list like the following:
- SomeList = {(2, 4), (7, 5), (3, 7), (4, 5), (5, 9), (6, 4), (7, 8), (8, 5), (12, 6), (13, 3), (13, 4)}
and I would like to end up with a list that includes only the elements/points whose X coordinate occurs more than once. Like this:
- Result = {(7, 5), (7, 8), (13, 3), (13, 4)}
How can I do that ?
Thank you for your help,
John.
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Hi,
you can use Remove, Unique and KeepIf commands to do that
list1=Remove[x(SomeList), Unique[x(SomeList)]]
KeepIf[x(A)∈list1,A,SomeList]
Cheers,
Zbynek
Hi,
you can use Remove, Unique and KeepIf commands to do that
list1=Remove[x(SomeList), Unique[x(SomeList)]]
KeepIf[x(A)∈list1,A,SomeList]
Cheers,
Zbynek
Very nice!
Thank you very much Zbynek.
John.
Comments have been locked on this page!