You need to create the function ¯le ivprk2.m together with the script ¯le astest4.m . We expect each of
the ¯les to contain suitable comments describing what they do. The assessment will be based on correct
working of the code, its e±ciency and appropriate comments.
In addition, you need to submit the source ¯le as well as a pdf ¯le for the LaTeX report for the part B.
The pdf ¯le should be up to 2 pages, including the two plots. You are free to choose fontsize, text-width
on the page etc, provided it remains clearly readable.
Given a matrix u of appropriate size, the command
will set the ¯rst column of u to u0. In general, recall that u(:,i) refers to the i-th column of matrix
3. Note that f(t; u) for this particular problem does not depend on t. Therefore, in actual implemen-
tation of ivprk2.m, k1 can be evaluated using a command which looks something like
k1 = [-u(1,i)*(1-u(2,i)); ??]);
with the question-marks replaced by an appropriate expression in your code. In other words, ti is
not needed here for evaluating f(ti; ui). k2 can be de¯ned similarly.