Posted by: F22 January 28, 2010
Terribly in Need, Matlab...
Login in to Rate this Post:     0       ?        
Its in no way complete and hasn't been verified but should be enough of a pointer to get you in the right track if using Matlab:

clear
clc
N = 2;
e = 100;
e1 = 10^-5;
piii(1)= 1/0.75;
while e >= e1
pii=0;
for k=1:N
piii1= ((-1)^(k+1))/(0.5*k-0.25);
pii=piii1+pii;
end
piii(N)=pii;
e=abs(piii(N)-piii(N-1))/piii(N-1);
N=N+1;
end

On a second note you could tell the Prof., " I can use pi function of Matlab to get the damn number, why worry about doing the homework"
Read Full Discussion Thread for this article