Difference between revisions of "Intersection Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
(change to command|list)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|list}}
{{command|other}}
+
; Intersection( &lt;List>, &lt;List> )
; Intersection[List 1, List 2]: Gives you a new list containing all elements that are part of both lists.
+
:Gives you a new list containing all elements that are part of both lists.
 +
:{{example|1=<div>Let <code><nowiki>list1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}</nowiki></code> and <code><nowiki>list2 = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30}</nowiki></code> be two lists. <code><nowiki>Intersection(list1, list2)</nowiki></code> yields a new list ''list3 = {2, 4, 6, 8, 10, 12, 14}''.</div>}}

Latest revision as of 11:01, 15 October 2019


Intersection( <List>, <List> )
Gives you a new list containing all elements that are part of both lists.
Example:
Let list1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} and list2 = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30} be two lists. Intersection(list1, list2) yields a new list list3 = {2, 4, 6, 8, 10, 12, 14}.
© 2024 International GeoGebra Institute