Академический Документы
Профессиональный Документы
Культура Документы
B1':1
clc
clear all
sorucj.on')
error:abs (error)
ii."=t"p"t (' ingrese numero
maxrm o
de iteraciones'
);
N:0;
attotaPtox=error*1; >error cc
while
"---- (ahfl(errot"plo"l
;
xz--it- (fx1ldfxl-)(x2-xl);
erroraprox:abs
xL:x2
i"l-:' log (x1) - (x1) +2 i
dfxl :(1/ (x1) ) -1;
N<:Nmax)
N:N+1;_
'-J'
.y
sol,ucroN Es:%f
EN EL INTENTO
SE EA CONSEGUIDO
%d'rxlrN) i
disp(tnP);
cIc
c].ear aII
Fll"ffiti?rii'i"lT:'::"1;l ''*"'os
-S-0;
for i:1:n
('ingrese valor %d' ' i) ;
tm : sPrintf(tmp)
;
A(i) : input
S : S+A(i) ;
p : 5/n;
es %d'rP)i
tmp = sPrintf ('la media
disP (tnP)
end
"-foo,
fl,',,,,,.,,t;. l'"'":',.,..,.
cIc
clear aII
il;i't"rooo
('ingrese
sEcANrE')
;/
/\
xl:inPut
fx}:Log(x2) - \xZ)
'--ot-r,put
'insrls" er ""t::--?;""'":":;::"cciones:
('ingrese numero max',
(
"=i"plt
&& n<nmax
*nii. abs(x2-x1)):error
n:n+1;
\ / $xl-fx2)
*S:*f-f*f* (1-x2
(x3) +2;
fx3:lo9
,.f,,,1,,'',r,.
(x3) -
xL:x2
fzl=fx2
t
I
I
")
--.,Y:"
, o.
.,...,1
"
');
;-:T I'
*1-
^',,
IX2:-- l:>1 *,t--)3.>)
t*v
XJ =V?
FYt
"frL
x L'-v3
x2:x3
fx2:fx3
n:0;
.-
E-*1
c*d
"
guJ
-*'
)i,