MATLAB: Making a transformation matrix and using it to rotate vectors

homeworkMATLABmatrixrotationthetavector

Hi so i have little experience with MATLAB so I dont understand the syntax to use and cant find it basically I have to do this
So what i tried to do is this
format short
sym x
R(x)= [cos(x), -sin(x); cos(x), sin(x)]
x=pi/7
A=R(pi/7)
but I end up getting
A =
[ cos(pi/7), -sin(pi/7)]
[ cos(pi/7), sin(pi/7)]
but I want that to be evaluated, what do I do?
Sorry if i sound uneducated with this, I have never used MATLAB before

Best Answer

No need to use symbolic here.
x = pi/7;
A =[cos(x),-sin(x);cos(x),sin(x)];
v = [2;-7];
Answer = A*v;