reasoningaboutspace/RotM.m

25 lines
544 B
Matlab

## Copyright (C) 2023 loann
## Author: loann <rio.loann@gmail.com>
## Created: 2023-02-03
##
function matrix = RotM (theta)
%%%%%%%%%%%%%%%%%%%%%
% function matrix = RotM (theta)
% ex. outVector = add2vectors(1.2433)
%
% Task: create a rotation matrix for a specific angle
%
% Inputs:
% - theta: angle in radius
%
% Output:
% -matrix: 2 dimention rotation matrix
%
% author: Loann rio (rio.loann@gmail.com)
% date: 03/02/2023
%%%%%%%%%%%%%%%%%%%%%
matrix = [cos(theta) -sin(theta); sin(theta) cos(theta)]
endfunction