MAT 581 HW 2

MAT 581 HW 2 - >> for j=n-1:-1:1;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
P2.1.3 a) a=[1;2;3;4;5;6;7]; z=5; >> n=length(a); >> pval=a(n); >> pval1=a(n); >> for i=n-1:-1:1; pval=z*pval+a(i); end
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: >> for j=n-1:-1:1; pval1=(-z)*pval1+a(j); end >> x=pval/pval1 x = 1.4128 b) y=pval+pval1 y = 225152...
View Full Document

This document was uploaded on 02/18/2011.

Ask a homework question - tutors are online