lve-the-Linear-Algebraic-Systems">Step 4: Solve the Linear Algebraic Systems<a class="anchor-link" href="#Step-4:-Solve-the-Linear-Algebraic-Systems">&#182;</a></h2><ul>
<li><p>Direct methods: Use the big matrix to solve <code>u = A\f</code>.</p>
</li>
<li><p>Iterative methods: Implement Gauss-Seidel method as a subroutine <code>GS(u,f)</code> and iterate</p>

<pre><code>while err &gt; tol
     u = GS(u,f);
     err = norm(f-A*u)/norm(f);
end</code></pre>
</li>
</ul>

</div>
</div>
</div>
<div class="cell b