I wanted to ask of you about this code. I made a Simpson's rule code that does work when i place in the variables but now i want to edit it so that instead of placing iterations as a variable, the function would continuously iterate until it reaches a certain accpetable error.
function [ s ] = Simpson13( f,a,b,M)
My plan is to replace all of the M into 'inf' and then putting an error statement afterwards to stop the infinite loop
if TolCur < TolMax
But according to matlab, i cant do this. Can someone give me any pointers to do this?