title: How can I correctly apply the scalar calibration of vector magnetometers?
body: <p>I need to calibrate a magnetometer using the method of Merayo with matlab. 
  I have found <a href="https://fr.mathworks.com/matlabcentral/fileexchange/23398-magnetometers-calibration/content/MgnCalibration.m" rel="nofollow">this code</a>:</p>
  
  <p>But I do not understand how I apply this technique. I fact I have the magnetic Data distorted, I apply the Magnetic Calibration.</p>
  
  <pre><code>[U,c] = MgnCalibration(X)
  </code></pre>
  
  <p>So I get U the Shape ellipsoid parameter and c the ellipsoid center.
  And the calibrated measurement is:
       w = U*(v-c)</p>
  
  <p>The problem is that when I calculate the corrected Data I have another order of values.</p>
  
  <pre><code>Data=[1750 1460 -3940]
  CalibratedData=[0.4042 0.3820 -0.6860]
  </code></pre>
  
  <p>What I did not very well understood?
  How can I use my magnetic data after this calibration?</p>