[hem,
1.
Repeat and finish all Matlab programs that we have done
during the course. Every student should have the following programs.
bisect.m
Make sure that you have these programs and that you understand
them. For each program you should also have some examples that show
how to use them.
Write down these examples on paper.
Perhaps you should write some of the programs again in order to learn
better.
2.
Some additional exercises to repeat important stuff.
a.
Write a for-loop that creates the following numbers in a column vector.
1/3, 1/9, ..., 1/3^10
b.
Create the same numbers without using a loop, in one or two command lines.
c.
Write a for-loop that computes the sum of these numbers.
d.
Compute the same sum with the Matlab program sum.
3. And a final word:
Never use the commands input, display,
plot, in the Matlab computational functions that you write.
(Except perhaps for displaying an error message if the computation
must be stopped.) The input and output to a function should go via
the input and output variables, for example, x and y in y=funk(x).
And the plotting is a separate task that should be done after the
function has been called, usually in a script file or on the command line.
/stig ALA-A, studio 7.1, 2006
Review
bisectdemo.m
fixpoint.m
derivative.m
newton.m