Experiments with MATLAB R
Cleve Moler
Copyright c 2009 Cleve Moler.
All rights reserved. No part of this e-book may be reproduced, stored, or transmitted in any manner without the written permission o
Newton-Raphson Method A scheme for finding a numerical solution of an equation of the form f(x) = 0 where f(x) is
continuous and differentiable and the equation is known to have a solution near a give
Braden Nichols
MTHSC 365
Moss
Exercise 3
January 27, 2011
Exercise 1
There is a value of zero in the first row of the A matrix.
There is a value of zero in the first row of the A matrix.
Matrix A is s
Braden Nichols
MTHSC 365
Moss
Exercise 5
2/3/2011
Exercise 1
Elapsed time is 0.316618 seconds.
Elapsed time is 0.001275 seconds.
Elapsed time is 0.002563 seconds.
Elapsed time is 0.001652 seconds.
No
Braden Nichols
MTHSC 365
Moss
Exercise 1
Exercise 2
All norm values are equal to one another
is singular
Exercise 3
Exercise 4
format long e
n=8
A = hilb(n);
x = rand(n,1);
b = A*x;
xsolve = A\b
resid
Braden Nichols
MTHSC 365
Moss
Exercise 1
Exercise 2
The eigenvalues of A-50*I are 50 less than the eigenvalues of A.
The eigenvectors of A-50*I are the same as the eigenvectors of A.
The eigenvalues o
Braden Nichols
MTHSC 365
Moss
Exercise 8
2/21/2011
Exercise 1
A has 3 singular positive values.
The orthonormal basis for A is given using orth(A).
The orthonormal basis for the null space of A is giv
Chapter 18
Sudoku
The remarkably popular puzzle demonstrates man versus machine, backtraking and
recursion, and the mathematics of symmetry.
2
3
4
6
3
4
5
8
8
6
1
7
6
5
7
6
4
8
3
4
2
Figure 18.1. A Su
Chapter 1
Iteration
An investigation of xed point iterations introduces the assignment statement, for
and while loops, the plot function, and the Golden Ratio.
Start by picking a number, any number. E
Chapter 3
Calendars and Clocks
Computations involving time, dates, biorhythms and Easter.
Calendars are interesting mathematical objects. The Gregorian calendar was
rst proposed in 1582. It has been g
Chapter 4
T Puzzle
A classic puzzle demonstrates complex arithmetic.
Figure 4.1. The wooden T puzzle. Photo courtesy of Shop New Zeland,
http:/www.shopnewzealand.co.nz.
I rst saw the wooden T puzzle s
Chapter 5
Matrices
Matlab began as a matrix calculator.
The Cartesian coordinate system was developed in the 17th century by the
French mathematician and philosopher Ren Descartes. A pair of numbers c
Chapter 6
Fractal Fern
The fractal fern involves 2-by-2 matrices.
The programs fern and finitefern in the exm toolbox produce the Fractal
Fern described by Michael Barnsley in Fractals Everywhere [?].
Chapter 7
Magic Squares
With origins in centuries old recreational mathematics, magic squares demonstrate
Matlab array operations.
Figure 7.1. Lo Shu. (Thanks to Byerly Wiser Cline.)
Copyright c 2009
Chapter 8
TicTacToe Magic
Three simple games are related in a surprising way.
The rst of the three games is Pick15. Harold Stark, who was then at the
University of Michigan, told me about the game in
Chapter 9
Game of Life
Conways Game of Life makes use of sparse matrices.
The Game of Life was invented by John Horton Conway, a British-born
mathematician who is now a professor at Princeton. The gam
Chapter 10
Mandelbrot Set
Fractals, topology, complex arithmetic and fascinating computer graphics.
Benoit Mandelbrot is a Polish/French/American mathematician who has spent
most of his career at the
Chapter 11
Linear Equations
The most important task in technical computing.
I am thinking of two numbers. Their average is 3. What are the numbers?
Please remember the rst thing that pops into your he
Chapter 12
Google PageRank
The worlds largest matrix computation.
One of the reasons why GoogleTM is such an eective search engine is the
PageRankTM algorithm developed by Googles founders, Larry Page