xtrue ;

x = inv(A)*b ; norm (b-A*x)
x = A\b      ; norm (b-A*x)
</pre><pre class="codeoutput">ans =
    0.0145
ans =
   1.7764e-15
</pre><p>The performance difference between BACKSLASH and INV for even small sparse matrices is striking.</p><pre class="codeinput">load <span class="string">west0479</span> ;
A = west0479 ;
n = size (A,1)
b = rand (n,1) ;
tic ; x = A\b ; toc
norm (b-A*x)
tic ; x = inv(A)*b ; toc
norm (b-A*x)
</pre><pre class="codeoutput">n =
   479
Elapsed time is 0.002805 seconds.
ans =
   9.