trabajo de laboratorio n

6
 T rabajo de laboratorio N°6 Programas: 1.- function F=F(X)%x es una matriz que contiene valores iniciale s x=X(1);y=X(2); F=[x^2+y!" xy^2#$; function F=F(X) x=X(1);y=X(2);  F=[2&x 1;1 2&y$; function ra'son(FFXesiteracionesmaximas)  *=feval(FX); for =1,iteracionesmaximas  =feval(FX);  X-=X(inv()&*.).  error1=a/s((X-(1)X(1))0X-(1))&1;  error2=a/s((X-(2)X(2))0X-(2))&1;  is'([.3teracion.num2str()$);  is'(. X(1) X(2).);is'(X-);  is'(. error1 error2.);  is'([num2str(error1). .num2str(error2)$);  is'(..);  if(error14=es)5(error24=es)  /rea  en  *=feval(FX-);  X=X-; 6n 2.- function F=F(X)%x es una matriz que contiene valores iniciales x=X(1);y=X(2); F=[ [x^22&xy+7 # x^2y^2#$; function F=F(X) x=X(1);y=X(2);  F=[ 2&x2 1;2&x 2&y$; function ra'son(FFXesiteracionesmaximas)  *=feval(FX);

Upload: marvin-aguirre

Post on 01-Mar-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Trabajo de Laboratorio N

7/25/2019 Trabajo de Laboratorio N

http://slidepdf.com/reader/full/trabajo-de-laboratorio-n 1/6

  Trabajo de laboratorio N°6

Programas:

1.- 

function F=F(X)%x es una matriz que contiene valores inicialesx=X(1);y=X(2);F=[x^2+y!" xy^2#$;

function F=F(X)x=X(1);y=X(2); F=[2&x 1;1 2&y$;

function ra'son(FFXesiteracionesmaximas) *=feval(FX);for =1,iteracionesmaximas

  =feval(FX);  X-=X(inv()&*.).  error1=a/s((X-(1)X(1))0X-(1))&1;  error2=a/s((X-(2)X(2))0X-(2))&1;  is'([.3teracion.num2str()$);  is'(. X(1) X(2).);is'(X-);  is'(. error1 error2.);  is'([num2str(error1). .num2str(error2)$);  is'(..);  if(error14=es)5(error24=es)  /rea

  en  *=feval(FX-);  X=X-;6n

2.-function F=F(X)%x es una matriz que contiene valores inicialesx=X(1);y=X(2);F=[ [x^22&xy+7# x^2y^2#$;

function F=F(X)

x=X(1);y=X(2); F=[ 2&x2 1;2&x 2&y$;

function ra'son(FFXesiteracionesmaximas) *=feval(FX);

Page 2: Trabajo de Laboratorio N

7/25/2019 Trabajo de Laboratorio N

http://slidepdf.com/reader/full/trabajo-de-laboratorio-n 2/6

for =1,iteracionesmaximas  =feval(FX);  X-=X(inv()&*.).  error1=a/s((X-(1)X(1))0X-(1))&1;  error2=a/s((X-(2)X(2))0X-(2))&1;

  is'([.3teracion.num2str()$);  is'(. X(1) X(2).);is'(X-);  is'(. error1 error2.);  is'([num2str(error1). .num2str(error2)$);  is'(..);  if(error14=es)5(error24=es)  /rea  en  *=feval(FX-);  X=X-;6n

-aliaX- =

  2782# 17"#

3teracion1  X(1) X(2)  2782# 17"#

  error1 error2

2!79:# "17298

X- =

  2721# 7":!

3teracion2  X(1) X(2)  2721# 7":!

  error1 error2197"#!8 127#"99

X- =

  !7:8!# #72:1

Page 3: Trabajo de Laboratorio N

7/25/2019 Trabajo de Laboratorio N

http://slidepdf.com/reader/full/trabajo-de-laboratorio-n 3/6

3teracion!  X(1) X(2)  !7:8!# #72:1

  error1 error2

722: 97"8:#

X- =

  !78! 27:"8

3teracion  X(1) X(2)  !78! 27:"8

  error1 error22:7!91 "87"2!

X- =

  27#88 178::1

3teracion#  X(1) X(2)  27#88 178::1

  error1 error21:7#! "!7"91

X- =

  271"! 7"22"

3teracion8  X(1) X(2)

  271"! 7"22"

  error1 error21971:9 1!#712#1

3.-

function F=F(X)%x es una matriz que contiene valores iniciales

Page 4: Trabajo de Laboratorio N

7/25/2019 Trabajo de Laboratorio N

http://slidepdf.com/reader/full/trabajo-de-laboratorio-n 4/6

x=X(1);y=X(2);F=[ x^(2)+x&y1y+!&x&y^(2)#"$;

function F=F(X)x=X(1);y=X(2);

 F=[ 2&x+y x;!&y^2 8&x+y$;

function ra'son(FFXesiteracionesmaximas) *=feval(FX);for =1,iteracionesmaximas  =feval(FX);  X-=X(inv()&*.).  error1=a/s((X-(1)X(1))0X-(1))&1;  error2=a/s((X-(2)X(2))0X-(2))&1;  is'([.3teracion.num2str()$);  is'(. X(1) X(2).);is'(X-);

  is'(. error1 error2.);  is'([num2str(error1). .num2str(error2)$);  is'(..);  if(error14=es)5(error24=es)  /rea  en  *=feval(FX-);  X=X-;6n

Salida

X- =

  27"9:# 7211

3teracion1  X(1) X(2)  27"9:# 7211

  error1 error287228 :!172#

X- =

  17#"19 !7"1

3teracion2  X(1) X(2)  17#"19 !7"1

Page 5: Trabajo de Laboratorio N

7/25/2019 Trabajo de Laboratorio N

http://slidepdf.com/reader/full/trabajo-de-laboratorio-n 5/6

  error1 error2""7"#! 11!7919!

X- =

  2711#" 27892

3teracion!  X(1) X(2)  2711#" 27892

  error1 error22#7"11 1#78!:

X- =

  17"#" !7"98

3teracion  X(1) X(2)  17"#" !7"98

  error1 error227#"1 !72"#

X- =

  !72!#2 272:"

3teracion#  X(1) X(2)  !72!#2 272:"

  error1 error2

#7"82 2"172"!"

X- =

  871:8 7

3teracion8

Page 6: Trabajo de Laboratorio N

7/25/2019 Trabajo de Laboratorio N

http://slidepdf.com/reader/full/trabajo-de-laboratorio-n 6/6

  X(1) X(2)  871:8 7

  error1 error2"7"9: #7!#:9

 4.-