Lösungen der Aufgaben rüberkopiert.

This commit is contained in:
2024-02-26 16:58:38 +01:00
parent be933b27d3
commit e81056717e
39 changed files with 449 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
function D = Drehmatrix(winkel)
%Berechnung der zweidimensionalen Drehmatrix; Winkel in Grad.
%Umrechnung in Rad
winkelRad = (winkel * pi) / 180;
%Generierung der Drehmatrix
D = [cos(winkelRad) -sin(winkelRad); sin(winkelRad) cos(winkelRad)];
end

View File

@@ -0,0 +1,10 @@
function x = Drehung(winkel, vektor)
%Dreht den gegebenen 2D-Spaltenvektor um den angegebenen Winkel.
%Erstellen der Drehmatrix
D = Drehmatrix(winkel);
%Drehung, durch Multiplikation mit der Drehmatrix
vektor=vektor(:);
x = D * vektor;
end

View File

@@ -0,0 +1,8 @@
function x = linTransfEbene(winkel, vektor, verschiebungsvektor)
%...
%Drehung des Vektors
x = Drehung(winkel, vektor);
%Verschiebung des Vektors
x = x + verschiebungsvektor;
end