P12_1 - x3(i,1) = (105 + 0.4*x1(i,1) + 0.4*x2(i,1))/0.8; if...

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

View Full Document Right Arrow Icon
function P12_1 f E = 5; E x1 = zeros(7,1); x2 = zeros(7,1); x3 = zeros(7,1); x x1(1,1) = 0; x2(1,1) = 0; x3(1,1) = 0; x i = 2 i while Err > E x1(i,1) = (41 + 0.4*x2(i-1,1))/0.8; x2(i,1) = (25 + 0.4*x1(i,1) + 0.4*x3(i-1,1))/0.8;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x3(i,1) = (105 + 0.4*x1(i,1) + 0.4*x2(i,1))/0.8; if i == 2 else Err = ((x1(i,1) - x1(i-1,1))/x1(i,1))*100 end i = i+1; end...
View Full Document

Ask a homework question - tutors are online