Problem 8 clc; clear all; close all error = (1:10).*10^(-2); for i = 1:length(error) N(i) = Find_N(error(i)); end plot(error, N); grid on function N = Find_N(error) if error<0 fprintf('error should be positive'); return end N = 0; sum = 0; while abs(sum - pi^2/6)>error N = N + 1; sum = sum + 1/N^2; end
View Full Document