title: converge values to range [-pi,pi] in matlab, NOT using wraptopi
body: <p>The assignment is: <strong>Reset the values stored in the matrix accordingly, so that they lie within this range [-pi,pi]. Take care not to use any non-standard Matlab function(s) to do this.</strong></p>
  
  <p>(of course are all angles theta + 2n*pi the same, for any integer n. Therefore for example: an angle of 1.5*pi should be reset to -0.5*pi.)</p>
  
  <p>The nonstandard matlabfunction wraptopi does this (I think), but I am not allowed to use this function.
  I've got the feeling that I could use modulo to do this, but I don't know how.</p>
  
  <p>Could anyone help me please?</p>
  
  <p>Thanks in advance</p>