Chapter 3. Basic Programming

section 3.9 exercises

Page 44. Exercise 5 and 6

To rotate a vector (x, y)T anticlockwise by θ radians, you premultiply it by the matrix.

cos(θ) −sin(θ)

sin(θ) cos(θ)

Write a program in R that does this for you.

Exercise 6 continues in page 45.

Thank you.

section 3.9 exercises

Page 44. Exercise 5 and 6

To rotate a vector (x, y)T anticlockwise by θ radians, you premultiply it by the matrix.

cos(θ) −sin(θ)

sin(θ) cos(θ)

Write a program in R that does this for you.

Exercise 6 continues in page 45.

Thank you.