Du befindest dich hier: FSI Informatik » Prüfungsfragen und Altklausuren » Prüfungen im Bachelor-Studium (1. - 5. Semester) » algoks » Lösungsvorschlag   (Übersicht)

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
pruefungen:bachelor:algoks:loesungws15 [02.08.2017 10:04] Marcel[Inf]pruefungen:bachelor:algoks:loesungws15 [05.08.2020 08:52] (aktuell) nename0
Zeile 130: Zeile 130:
  
 **c)**\\ **c)**\\
 +
 +Sehr ungenau, aber man sieht das Konzept: https://i.imgur.com/IPK64lC.png
  
 **d)**\\ **d)**\\
Zeile 145: Zeile 147:
  
 ==== Aufgabe 7 (Programmierung: Bilineare Interpolation) ==== ==== Aufgabe 7 (Programmierung: Bilineare Interpolation) ====
 +<code> 
 +def getInterpolatedPixel(img, u, v): # img ist np array 
 +  xf = v * (img.shape[1] - 1) 
 +  yf = u * 8img.shape[0] - 1) 
 +  p00 = (floor(xf), floor(yf)) 
 +  p01 = (ceil(xf), floor(yf)) 
 +  p10 = (floor(xf), ceil(yf)) 
 +  p11 = (ceil(xf), ceil(yf)) 
 +  w0 = xf - p00[0] 
 +  w1 = yf - p11[1] 
 +  return w1 * ((1-w0) * img[p00] + w0 * img[p01]) + (1-w1) * ((1-w0) * img[p10] + w0 * img[p11])) 
 +</code>
 ==== Aufgabe 8 (Baryzentrische Koordinaten) ==== ==== Aufgabe 8 (Baryzentrische Koordinaten) ====
 **a)**\\ **a)**\\
Zeile 191: Zeile 204:
  
 ==== Aufgabe 10 (Hauptkomponentenanalyse) ==== ==== Aufgabe 10 (Hauptkomponentenanalyse) ====
 +
 +**a)**\\
  
 Schwerpunkt S = (1, 1)^T\\ Schwerpunkt S = (1, 1)^T\\
 A := (p_0 - S | p_1 - S | ... | p_4 - S) A := (p_0 - S | p_1 - S | ... | p_4 - S)
  
-Dann ist C = 1/(5 - 1) * AA^T = 1/2 {{9, 0}, {0, 4}}+Dann ist C = 1/(5 - 1) * AA^T = 1/2 {{9, 0}, {0, 4}}
 + 
 +**b)**\\ 
 +<code> 
 +det(B-\lambda Id) = (1-\lambda)(7-\lambda) // bitte a^2-b^2 = (a-b)(a+b) nutzen :) 
 + 
 +Eig(1) = span{(1, 1)^T}\\ 
 +Eig(7) = span{(-1, 1)^T}</code>
  
 ==== Aufgabe 11 (Numerische Integration) ==== ==== Aufgabe 11 (Numerische Integration) ====