.. highlightlang:: us .. index:: pinv .. _pinv: pinv ==== .. us.tag pinv NOTREADYENGLISH math-lin-alg Changed5503 :ref:`pinv` calculates the pseudoinverse of a given matrix. .. function:: x = pinv(a) .. us.return **Return Value** *x* is the pseudoinverse of *a*. .. us.params **Parameters** .. uparam:: a *a* is a real or complex matrix. .. us.example **Example** :: * a=magic(8); a = a[;1:6] * a 64.0000 2.0000 3.0000 61.0000 60.0000 6.0000 9.0000 55.0000 54.0000 12.0000 13.0000 51.0000 17.0000 47.0000 46.0000 20.0000 21.0000 43.0000 40.0000 26.0000 27.0000 37.0000 36.0000 30.0000 32.0000 34.0000 35.0000 29.0000 28.0000 38.0000 41.0000 23.0000 22.0000 44.0000 45.0000 19.0000 49.0000 15.0000 14.0000 52.0000 53.0000 11.0000 8.0000 58.0000 59.0000 5.0000 4.0000 62.0000 * b = 260*ones(8,1) * b 260.0000 260.0000 260.0000 260.0000 260.0000 260.0000 260.0000 260.0000 * x = pinv(a)*b * x 1.1538 1.4615 1.3846 1.3846 1.4615 1.1538 * a*x 260.0000 260.0000 260.0000 260.0000 260.0000 260.0000 260.0000 260.0000 .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.3 - New. .. seealso:: :ref:`overview-mathematic`, :ref:`inv` :sub:`id-1019978`