function v=naivep(P,z) p=1; n=length(P)-1; s=P(n+1); maxn=abs(s) for k=1:n, p=p*z; s=s+p*P(n+1-k); maxn=max(maxn,abs(s)) end v=s;