Você está na página 1de 118

k=1;x(k)=0.5*(a+b);FX=f(x(k));FA=f(a);FB=f(k=1;x(k)=0.5*(a+b);FX=f(x(k));FA=f(a);FB=f(

b);e_rel=+Inf;whilek<kmax&&abs(e_rel)>tolifb);e_rel=+Inf;whilek<kmax&&abs(e_rel)>tolif

FA*FX<=0b=x(k);FB=FX;elsea=x(k);FA=FX;endk=FA*FX<=0b=x(k);FB=FX;elsea=x(k);FA=FX;endk=

k+1;x(k)=0.5*(a+b);FX=f(x(k));e_rel=(x(k1),k+1;x(k)=0.5*(a+b);FX=f(x(k));e_rel=(x(k1),

x(k));endz=x(k);n=size(A,1);fori=1:nforj=1:x(k));endz=x(k);n=size(A,1);fori=1:nforj=1:

nifi==jC(i,j)=0;elseC(i,j)=A(i,j)/A(i,i);ennifi==jC(i,j)=0;elseC(i,j)=A(i,j)/A(i,i);en

Cálculo Numérico

Notas de Aula

dendd(i,1)=)=((j1)/n)^(i);s(n+1,1);b(i)/A(idendd(i,1)=)=((j1)/n)^(i);s(n+1,1);b(i)/A(i

,i);endk=1;x=ones(n,1);e_rel=+Inf;whilek<km,i);endk=1;x=ones(n,1);e_rel=+Inf;whilek<km

ax&e_rel>tolk=k+1;x_ant=x;fori=1:nx(i)=C(i,ax&e_rel>tolk=k+1;x_ant=x;fori=1:nx(i)=C(i,

:)*x+d(i);ende_rel=t(x_ant,x);endn=length(c:)*x+d(i);ende_rel=t(x_ant,x);endn=length(c

);y=0;fork=1:ny=y.*x+c(k);endn=length(x);fo);y=0;fork=1:ny=y.*x+c(k);endn=length(x);fo

ri=1:nX(i,m+1)=1;forj=m:1:1X(i,j)=x(i)*X(i,ri=1:nX(i,m+1)=1;forj=m:1:1X(i,j)=x(i)*X(i,

j+1);endA=zeros(n+1,n+1);for)=((j1)/n)^(i1)j+1);endA=zeros(n+1,n+1);for)=((j1)/n)^(i1)

;s(n+1,1))=((j1)/n)^(i1);sfori=0:nwhilek<1;;s(n+1,1))=((j1)/n)^(i1);sfori=0:nwhilek<1;