10 lines
269 B
Matlab
10 lines
269 B
Matlab
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 |