Hi I'm trying to estimate a cos graph using summation between 1:1, 1:2, 1:3, 1:4 and 1:5. How would I plot each of these individually?
Could someone help me out please! Thank you
x = -pi:0.1:pi;ye = cos (x);n = 5;summe = 0.0;for i = 1:n summe = summe +((-1).^(i)).*((x.^(2.*i))./(factorial(2.*i)));end plot (x, summe);
Best Answer