Werkzeugkiste - Code für CAS Anwendungen

Author:
hawe
  • Matrix aus Folge - Matrix from Sequence
  • 0-Matrix - 0 Sequence (num range) - dyadic vector product | __ (column matrix * row matrix)
  • Matrixelemente aus Zeilenspaltenindex generieren - Generate matrix elements from row column index
  • GLS auslesen und in Matrixgleichung A x = b aufstellen - Read GLS and set up matrix equation A x = b
  • Probe: Ergebnis in GLS einsetzen - Test: Insert result into GLS
  • Aus einer Matrixgleichung ein GLS ableiten - Derive a GLS from a matrix equation
  • 4. Spalte (letzte Spalte Length(M)) einer Matrix in einen Vektor schreiben - Write 4th column (last column Length(M)) of a matrix into a vector
  • Ein gemischtes GLS, xi+Konstante=0, (ohne rechte Seite) in eine Matrix A x=b übertragen - Transfer a mixed GLS, xi+constant=0, (without right side) into a matrix A x=b
  • Matrix um einen Spalten-Vektor ergänzen (Ax=b, A b erweitere Matrix) - Extend matrix by a column vector (Ax=b, A b extended matrix)
  • Zeilen- Spaltentauschmatrizen aus CAS-Function - row-column exchange matrices from CAS-Function
  • VEKTOREN spaltenweise zu einer Matrix zusammen montieren - assemble vectors column-wise into a matrix
  • Spiegelung von vo an Ebene no |no| skalierter Normalenvektor) - reflect vector to plane no |no| scaled normal vector)
  • Punktkoordinaten in Koodinatenebene einsetzen - insert point coordinates into coodinate plane
cas functions Homogene Koordinaten HxT(AA):=Take(AA,1,3)/Element(AA,4) TxH(AA):=Transpose(Flatten({AA})+{0,0,0,1}), AA(vector) VecH2Point(aa):=(Element(Flatten(aa), 1),Element(Flatten(aa), 2),Element(Flatten(aa), 3))/Element(Flatten(aa), 4) PointH2vec(aa):=Substitute(Vector((x,y,z)), {x,y,z}= Take(Flatten(aa),1,3)/Take(Flatten(aa),4,4)) vec2Matrix(AA):={{AA {1,0,0}},{AA {0,1,0}},{AA {0,0,1}}} vec2Matrix(AA):=Transpose({Flatten({Vector(AA)})}) vec2List(AA):=Flatten({Vector(AA)}) vector/point to matrix/list (only 4 algebraview) row wise vector to matrix M_r=Zip(Zip(pp vv, vv, {(1, 0, 0), (0, 1, 0), (0, 0, 1)}), pp, {A, B, C}) collumn wise vector to matrix M_c=Zip(Zip(pp vv, pp, {A, B, C}), vv, {(1, 0, 0), (0, 1, 0), (0, 0, 1)}) in CAS M_r=Sequence(Sequence(Element({A,B,C},jj) Element(Identity(3), kk),kk,1,3) ,jj,1,3) M_c=Sequence(Sequence(Element({A,B,C},jj) Element(Identity(3), kk),jj,1,3) ,kk,1,3) {A,B,C}={(-3, 5, 0), (2, 3, -1), (-1, 1, 1)}