⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sor_method.txt

📁 sor method matlab for iterative methode
💻 TXT
字号:
% (c) 2004/2005 Universitaet Stuttgart
% Chair 'Numerische Mathematik fuer Hoechstleistungsrechner'
% http://www.ians.uni-stuttgart.de/nmh
%
% ----------------------------------------------------------
% Permission to use this exercise for non-profit educational
% purposes is hereby granted provided that this copyright 
% notice is included in all copies or substantial portions
% of the LaTeX files.
% ----------------------------------------------------------

\begin{exercise}{Jacobi and SOR method}{tutorial}{10}{indir02\_eng}
Write Matlab functions with the function headers
\begin{itemize}
\item[a)] \texttt{function [u,m] = solveJacobi(A, f, s, tol, max)}
\item[b)] \texttt{function [u,m] = solveSOR(A, f, s, w, tol, max)}
\end{itemize}
that solve the linear equation system $Au=f$ iteratively by using the Jacobi and the SOR method ($A$ must be a symmetric, positive definite $n \times n$ matrix). \texttt{tol} represents a given termination condition (see below), \texttt{max} is the maximum number of iterations to perform, $s$ is the iteration start vector, $w \in (0, 2)$ the so-called relaxation parameter of the SOR method. The output arguments of the function are the number of iterations performed $m$ and the approximate solution vector $u$.
\[
\text{Termination condition:} ~~ \frac{\norm{f-Au}_2}{\norm{f}_2} \leq \texttt{tol}
\]
\end{exercise}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -