MATLAB: How to write a MATLAB program which calculates the exact values for the geometric series geometric seriesMATLAB a/(1-r)=a+ar+ar^2…ar^6 0<r<1 Exact Values to calculate a=1 r=(1/7) a=3 r=(1/3) a=2 r=(1/9) Please help. Thanks Best Answer a=1; %first termr=1/7;n=5; %number of values in geometric seriess = a*r.^(0:n-1)If you want sum, then writegp_sum=sum(a*r.^(0:n-1)) Related SolutionsMATLAB: Calculate the sum of the following geometric series when N = 1000 and r =1/2 I have searched here and in the “help” in Matlab, but i found nothing about the geometric series If your geometric series is a, a*r, a*r^2, ..., a*r^N, then its sum is:s = a*(1-r^(N+1))/(1-r) MATLAB: How can i calculate the sum of the following geometric series N= 1000 and r =0.99 N=0:1000;r = 0.99;E = r.^N;sum(E) Related QuestionHow to create a for loop inside another for loop for a geometric seriesHow to create and call a function which returns the sum of the series (2n)*r^(2n+1), prompting the user for values r and n
Best Answer