Hi all. I am working on a problem where I have three saved functions: Mid, Trap, and Simp. These functions are used to approximate an integral in function "Func". Basically, I have to end up with a table that has an N value, the method (Mid, Trap, or Simp) used to find that N value, the value that each function brings forth for every value N, and the absolute error for each function calculating each number. However, I am not sure how to define Method and Value. Method would have to technically equal three different things, and value would have to be defined in a way that it is calculating the value for each function at each N. Could you guys steer me in the right direction? (This is a school assignment, so no complete answers).
Here is my code so far:
fprintf('%s | %s | %s | %s \n','N','Method','Value','abserror')
for N=[10 20 40 80 160 320]
fprintf('%s | %s | %s | %s \n',N,Method,Value,abserror)