MATLAB: Rotating a Vector

rotatevectors

Hello! I am wondering if anyone has an elegant way to rotate a vector by a specified degree.
For example, I have a vector that goes from (0,0) to (-1,-12). I want to rotate this vector by 5 degrees, incrementally until it reaches the x-axis.
Obviously this can be done from the math, but I wonder if anyone has a nicer way of doing this.
Thank you in advance!
Amina

Best Answer

complex
vR = v*[1;1i]*exp(-1i*theta*pi/180)