Question: You have plotted values of cosine from -10 to 10 and want to change the x-axis tick marks to every pi, from -3*pi to 3*pi. Which statement will do that?

  1. xticks(-3*pi:3.14:3*pi)
  2. xticks(-3*pi:pi:3*pi)
  3. xticks(linespace(-3*pi(), 3*pi(), pi()))
  4. xticks(linespace(-3*pi, 3*pi, pi)

Answer: The correct answer of the above question is Option B:xticks(-3*pi:pi:3*pi)