ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Arquitectura aplicada

Edward DchInforme28 de Abril de 2022

4.671 Palabras (19 Páginas)76 Visitas

Página 1 de 19

1.

clc

clear

X=[-2 0 2 4]

Y=4./(X.^2+X+1)

[C, L] = lagrange(X,Y)

%grafica de la f y de su pol. de lagrange

x=[-2:0.01:4];

y=4./(x.^2+x+1);

y1=polyval(C,x);

plot(x,y1,'k','linewidth',2)

hold on

plot(x,y,'r','linewidth',2)

hold off

grid on[pic 1]

X=[-2 0 2 4]

X =

    -2     0     2     4

Y=4./(X.^2+X+1)

Y =

          1.33333333333333                         4         0.571428571428571          0.19047619047619

[C, L] = lagrange(X,Y)

C =

          0.19047619047619        -0.761904761904762        -0.952380952380952                         4

L =

       -0.0208333333333333                     0.125        -0.166666666666667                         0

                                   0.0625                     -0.25                     -0.25                                          1

                                  -0.0625                     0.125                       0.5                                           0

        0.0208333333333333                         0       -0.0833333333333333                            0

2.

clc

clear

X=[-2 -1 0 1 2 3 4]

Y=4./(X.^2+X+1)

[C, L] = lagrange(X,Y)

%grafica de la f y de su pol. de lagrange

x=[-2:0.01:4];

y=4./(x.^2+x+1);

y1=polyval(C,x);

plot(x,y1,'k','linewidth',2)

hold on

plot(x,y,'r','linewidth',2)

hold off

grid on[pic 2]

X=[-2 -1 0 1 2 3 4]

X =

    -2    -1     0     1     2     3     4

Y=4./(X.^2+X+1)

Y =

  Columns 1 through 4

          1.33333333333333                         4                         4          1.33333333333333

  Columns 5 through 7

         0.571428571428571         0.307692307692308          0.19047619047619

[C, L] = lagrange(X,Y)

C =

  Columns 1 through 4

0.0244200244200244        -0.161172161172161        0.0683760683760684          1.18681318681319

  Columns 5 through 7

         -1.42612942612943         -2.35897435897436                         4

L =

  Columns 1 through 4

       0.00138888888888889                   -0.0125                     0.0347222222222222                                          -0.0208333333333333

      -0.00833333333333333        0.0666666666666667                    -0.125                                                                                             -0.166666666666667

        0.0208333333333333        -0.145833333333333         0.145833333333333         0.729166666666667

       -0.0277777777777778         0.166666666666667       -0.0277777777777778                                             -1

        0.0208333333333333        -0.104166666666667                   -0.0625         0.604166666666667

      -0.00833333333333333        0.0333333333333333        0.0416666666666667                                         -0.166666666666667

       0.00138888888888889      -0.00416666666666667      -0.00694444444444445        0.0208333333333333

  Columns 5 through 7

       -0.0361111111111111        0.0333333333333333                         0

         0.633333333333333                      -0.4                                             0

         -1.16666666666667        -0.583333333333333                            1

         0.555555555555556          1.33333333333333                             0

        0.0416666666666667                      -0.5                                            0

       -0.0333333333333333         0.133333333333333                           0

       0.00555555555555555       -0.0166666666666667                        0

3.

clc

clear

X=[0 pi/2 pi 3*pi/2 2*pi]

Y=4*cos(2*X)+6*sin(X)

[C, L] = lagrange(X,Y)

%grafica de la f y de su pol. de lagrange

x=[0:pi/100:2*pi];

Y=4*cos(2*x)+6*sin(x);

y1=polyval(C,x);

plot(x,y1,'k','linewidth',2)

hold on

plot(x,Y,'r','linewidth',2)

hold off

grid on

[pic 3]

X=[0 pi/2 pi 3*pi/2 2*pi]

X =

  Columns 1 through 4

          0           1.5707963267949          3.14159265358979          4.71238898038469

  Column 5

          6.28318530717959

Y=4*cos(2*X)+6*sin(X)

Y =

  Columns 1 through 4

                         4                         2                         4                       -10

  Column 5

                         4

[C, L] = lagrange(X,Y)

C =

  Columns 1 through 4

         0.438015242866532         -4.98823732566819          16.7517690288665                                                          -16.9765272631355  

  Column 5

                         4

L =

  Columns 1 through 4

       0.00684398816978956        -0.107505114777332         0.591040237913637                             -1.32629119243246

       -0.0273759526791582         0.387018413198394         -1.75623384980052          2.54647908947033

        0.0410639290187373        -0.516024550931192          1.92510248920442                                    -1.90985931710274

       -0.0273759526791582         0.301014321376529        -0.945664380661819         0.848826363156775

       0.00684398816978956        -0.064503068866399         0.185755503344286                                      -0.159154943091895

  Column 5

                         1

                         0

                         0

                         0

                         0

4.

clc

clear

X=[0 pi/4 pi/2 3*pi/4 pi 5*pi/4 3*pi/2 7*pi/4 2*pi]

Y=4*cos(2*X)+6*sin(X)

[C, L] = lagrange(X,Y)

%grafica de la f y de su pol. de lagrange

x=[0:pi/100:2*pi];

Y=4*cos(2*x)+6*sin(x);

y1=polyval(C,x);

plot(x,y1,'k','linewidth',2)

hold on

plot(x,Y,'r','linewidth',2)

hold off

grid on

grid on

X=[0 pi/4 pi/2 3*pi/4 pi 5*pi/4 3*pi/2 7*pi/4 2*pi][pic 4]

X =

  Columns 1 through 4

                         0                           0.785398163397448           1.5707963267949          2.35619449019234

...

Descargar como (para miembros actualizados) txt (11 Kb) pdf (228 Kb) docx (149 Kb)
Leer 18 páginas más »
Disponible sólo en Clubensayos.com