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

Arquitectura aplicada


Enviado por   •  28 de Abril de 2022  •  Informes  •  4.671 Palabras (19 Páginas)  •  46 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

...

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