List: Unterschied zwischen den Versionen

Aus JACK Wiki
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Zeile 18: Zeile 18:


===Beispiele===
===Beispiele===
  list(1,2,4.23,vector(1,2),concat('Hello','World','!'))
    set(vector(1,1),vector(1,2))


OpenMath:
  <OMOBJ><OMA><OMS cd="list1" name="list"/><OMA><OMS cd="linalg2" name="vector"/><OMI>1</OMI><OMI>1</OMI></OMA><OMA><OMS cd="linalg2" name="vector"/><OMI>1</OMI><OMI>2</OMI></OMA></OMA></OMOBJ>
LaTeX:
  <math>\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix} , \begin{pmatrix} 1 \\ 2 \end{pmatrix} \}</math>


[[Kategorie:Konstruktor]]
[[Kategorie:Konstruktor]]

Version vom 29. September 2017, 15:11 Uhr

Beschreibung

Die Funktion list dient als Konstruktor für eine Liste. Es können Objekte und Funktionen, die Objekte zurückgeben als Elemente hinzugefügt werden.

Funktionen

Syntax

 list(Objekt param1, Funktion param2)

Parameter

  • param1 - Objekt z.B. Zahl oder Matrix
  • param2 - Funktion, die ein Objekt zurück gibt

Return Value

  • Gibt die Liste zurück

Beispiele

   set(vector(1,1),vector(1,2))

OpenMath:

 <OMOBJ><OMA><OMS cd="list1" name="list"/><OMA><OMS cd="linalg2" name="vector"/><OMI>1</OMI><OMI>1</OMI></OMA><OMA><OMS cd="linalg2" name="vector"/><OMI>1</OMI><OMI>2</OMI></OMA></OMA></OMOBJ>

LaTeX:

 <math>\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix} , \begin{pmatrix} 1 \\ 2 \end{pmatrix} \}</math>