Q2
(a)
function[noiter,x]=GaussSeidel(A,b,x0,tol)
[n,n1]=size(A);
if n1~=n
error('A should be square matrix!')
end
[n2,n3]=size(b);
if n2~=n
error('b should be n rows!')
end
if n3~=1
error('b should b
Chapter 8
Fourier Analysis
We all use Fourier analysis every day without even knowing it. Cell phones, disc drives, DVDs, and JPEGs all involve fast finite Fourier transforms. This chapter discusses b
Chapter 7
Ordinary Differential Equations
Matlab has several different functions for the numerical solution of ordinary differential equations. This chapter describes the simplest of these functions a
Chapter 11
Partial Dierential
Equations
A wide variety of partial dierential equations occurs in technical computing. We
cannot begin to cover them all in this book. In this chapter, we limit ourselve
Chapter 6
Quadrature
The term numerical integration covers several different tasks, including numerical evaluation of integrals and numerical solution of ordinary differential equations. So we use the
Chapter 9
Random Numbers
This chapter describes algorithms for the generation of pseudorandom numbers with both uniform and normal distributions.
9.1
Pseudorandom Numbers
0.95012928514718
Here is an i
Chapter 1
Introduction to MATLAB
This book is an introduction to two subjects: Matlab and numerical computing. This rst chapter introduces Matlab by presenting several programs that investigate elemen
Chapter 4
Zeros and Roots
This chapter describes several basic methods for computing zeros of functions and then combines three of the basic methods into a fast, reliable algorithm known as `zeroin'.
Chapter 2
Linear Equations
One of the problems encountered most frequently in scientific computation is the solution of systems of simultaneous linear equations. This chapter covers the solution of li
Preface
Numerical Computing with MATLAB is a textbook for an introductory course
in numerical methods, Matlab, and technical computing. The emphasis is on informed use of mathematical software. We wan
Chapter 5
Least Squares
The term least squares describes a frequently used approach to solving overdetermined or inexactly specied systems of equations in an approximate sense. Instead
of solving the
AMATH 242 CM 271 CS 371
Assignment 6
Due : Tuesday, July 30, 20131
Instructor: K. D. Papoulia
1. Suppose you are given two vectors a = (a0 , . . . , an ) and b = (b0 , . . . , bn ) which
are the coece
AMATH 242 CM 271 CS 371
Assignment 5
Due : Thursday, July 18, 2013
Instructor: K. D. Papoulia
1. Recall that a Vandermonde matrix is an n n matrix formed from a vector x =
(x0 , x1 , x2 , . . . , xn1
AMATH 242 CM 271 CS 371
Assignment 3
Due : Tuesday June 25, 2013
Instructor: K. D. Papoulia
1. Suppose one wishes to perform Gaussian elimination with partial pivoting on an nn
matrix A, where n is ev
AMATH 242 CM 271 CS 371
Assignment 4
Due : Thursday, July 11, 2013
Instructor: K. D. Papoulia
1. (a) Consider the function f (x) = x/ x2 + 1. This function has a unique root at
x = 0. Does Newtons met
AMATH 242 / CM 271 / CS 371
Assignment 1
due Thursday, May 30, 2013
Instructor: K. D. Papoulia
1. Consider the following Matlab computation:
> format long
> x=9.4
x=
9.400000000000000
> y=x-9
y=
0.400
Chapter 3
Interpolation
Interpolation is the process of defining a function that takes on specified values at specified points. This chapter concentrates on two closely related interpolants: the piece
Chapter 10
Eigenvalues and Singular
Values
This chapter is about eigenvalues and singular values of matrices. Computational
algorithms and sensitivity to perturbations are both discussed.
10.1
Eigenva