Hi,
if I have an octave question type and I want the students to calculate something like this:
Write a function calculating the Simpson rule on the interval [a,b], with a<b!
Which would be something like this
function S = simpson(f,a,b)
m=(a+b)/2;
S=((b-a)/6)*(f(a)+4*f(m)+f(b));
end
So, now the question is how to evaluate the students answer within a given tolerance, e.g. relative tolerance should be equal to 0.01.Is it possible to check the students answer without modification of the coderunner template?
Thnak you very much in advance!
Alex