Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Datos:
Periodo
(x)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
1942.21
1968.1
1925.35
1877.66
1832.45
1815.09
1795.93
1816.28
1875.78
1899.89
1872.46
1880.37
1866.2
1817.35
Vector de las y = [2238 2259 2246 2190 2104 1930 1960 1984 2147 2013 2005 2089.11
1987.81 2007.41 1910.81 1815.65 1785.17 1785.04 1707.87 1778.8 1816.25 2041.81 2160.08
2392.28 2324.1 2204.95 2247.87 2547.4 2340.83 2343.34 2252.8 2015.4 2116.99 1997.01
2018.72 1919.75 1993.8 1997.47 2043.41 1981.96 1928.86 1907.06 1942.21 1968.1 1925.35
1877.66 1832.45 1815.09 1795.93 1816.28 1875.78 1899.89 1872.46 1880.37 1866.2 1817.35]
Vector de las x = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56]
11/7)*(x/20 - 7/5)*(x/9 - 17/9)*(x/18 - 13/9)*(x/11 - 19/11)*(x/32 - 5/4)*(x/28 - 9/7)*(x/13 21/13)*(x/22 - 15/11)*(x/40 - 6/5)*(x/15 - 23/15)*(x/26 - 17/13)*(x/36 - 11/9)*(x/17 25/17)*(x/48 - 7/6)*(x/30 - 19/15)*(x/19 - 27/19)*(x/44 - 13/11)*(x/21 - 29/21)*(x/34 21/17)*(x/23 - 31/23)*(x/38 - 23/19)*(x/25 - 33/25)*(x/42 - 25/21)*(x/27 - 35/27)*(x/29 37/29)*(x/46 - 27/23)*(x/31 - 39/31)*(x/33 - 41/33)*(x/35 - 43/35)*(x/37 - 45/37)*(x/39 47/39)*(x/41 - 49/41)*(x/43 - 51/43)*(x/45 - 53/45)*(x/47 - 55/47)*(x - 7)*(x - 9) - (54002*(x/2
- 21/2)*(x/23 - 2)*(x/3 - 20/3)*(x/4 - 19/4)*(x/5 - 18/5)*(x/2 - 25/2)*(x/6 - 17/6)*(x/7 16/7)*(x/8 - 15/8)*(x/3 - 26/3)*(x/9 - 14/9)*(x/10 - 13/10)*(x/11 - 12/11)*(x/4 - 27/4)*(x/12 11/12)*(x/13 - 10/13)*(x/14 - 9/14)*(x/5 - 28/5)*(x/15 - 8/15)*(x/16 - 7/16)*(x/17 - 6/17)*(x/6
- 29/6)*(x/18 - 5/18)*(x/19 - 4/19)*(x/20 - 3/20)*(x/7 - 30/7)*(x/21 - 2/21)*(x/22 - 1/22)*(x/8 31/8)*(x/9 - 32/9)*(x/10 - 33/10)*(x/11 - 34/11)*(x/12 - 35/12)*(x/13 - 36/13)*(x/14 37/14)*(x/15 - 38/15)*(x/16 - 39/16)*(x/17 - 40/17)*(x/18 - 41/18)*(x/19 - 42/19)*(x/20 43/20)*(x/21 - 44/21)*(x/22 - 45/22)*(x/24 - 47/24)*(x/25 - 48/25)*(x/26 - 49/26)*(x/27 50/27)*(x/28 - 51/28)*(x/29 - 52/29)*(x/30 - 53/30)*(x/31 - 54/31)*(x/32 - 55/32)*(x/33 56/33)*(x - 22)*(x - 24))/25 - (1286884901823447*(x/2 - 27/2)*(x/3 - 26/3)*(x/4 - 25/4)*(x/5 24/5)*(x/2 - 31/2)*(x/6 - 23/6)*(x/7 - 22/7)*(x/8 - 21/8)*(x/3 - 32/3)*(x/9 - 20/9)*(x/10 19/10)*(x/11 - 18/11)*(x/4 - 33/4)*(x/12 - 17/12)*(x/13 - 16/13)*(x/14 - 15/14)*(x/5 34/5)*(x/15 - 14/15)*(x/16 - 13/16)*(x/17 - 12/17)*(x/6 - 35/6)*(x/18 - 11/18)*(x/19 10/19)*(x/20 - 9/20)*(x/7 - 36/7)*(x/21 - 8/21)*(x/22 - 7/22)*(x/23 - 6/23)*(x/8 - 37/8)*(x/24 5/24)*(x/25 - 4/25)*(x/26 - 3/26)*(x/9 - 38/9)*(x/27 - 2/27)*(x/28 - 1/28)*(x/10 - 39/10)*(x/11
- 40/11)*(x/12 - 41/12)*(x/13 - 42/13)*(x/14 - 43/14)*(x/15 - 44/15)*(x/16 - 45/16)*(x/17 46/17)*(x/18 - 47/18)*(x/19 - 48/19)*(x/20 - 49/20)*(x/21 - 50/21)*(x/22 - 51/22)*(x/23 52/23)*(x/24 - 53/24)*(x/25 - 54/25)*(x/26 - 55/26)*(x/27 - 56/27)*(x - 28)*(x 30))/549755813888 - (11264*(x/2 - 29/2)*(x/3 - 28/3)*(x/4 - 27/4)*(x/5 - 26/5)*(x/2 33/2)*(x/6 - 25/6)*(x/7 - 24/7)*(x/8 - 23/8)*(x/3 - 34/3)*(x/9 - 22/9)*(x/10 - 21/10)*(x/11 20/11)*(x/4 - 35/4)*(x/12 - 19/12)*(x/13 - 18/13)*(x/14 - 17/14)*(x/5 - 36/5)*(x/15 16/15)*(x/16 - 15/16)*(x/17 - 14/17)*(x/6 - 37/6)*(x/18 - 13/18)*(x/19 - 12/19)*(x/20 11/20)*(x/7 - 38/7)*(x/21 - 10/21)*(x/22 - 9/22)*(x/23 - 8/23)*(x/8 - 39/8)*(x/24 - 7/24)*(x/25
l(1)=1;
for j=1:n-1
l(1)=l(1)*((x-xj(j))/(xie-xj(j)));
end
for i=2:n
xie=xi(i);
for j=1:i-1
xj(j)=xi(j);
end
for j=i:n-1
xj(j)=xi(j+1);
end
l(i)=1;
for j=1:n-1
l(i)=l(i)*((x-xj(j))/(xie-xj(j)));
end
end
l;
f=0;
for v=1:n
f=f+(yi(v)*l(v));
end
f
x=0
y=0
longx=0
sumaxpory=0
sumaxcuadradopory=0
sumaxTrespory=0
sumaxCuatropory=0
x=input('Ingrese vector con los valores de X: ');
y=input('Ingrese vector con los valores de Y: ');
GradoPol=0
longx= length(x)
longy=length(y)
if (longx>longy) || (longx<longy)
disp('Error: el numero de elementos de x debe ser igual al numero
de elemntos de y')
return
end
for jy=1:((2*GradoPol)-1)
for j=1:longx
mat(j,jy)=(x(j))^(jy+1);
end
end
disp('Las columnas de la siguiente matriz corresponden a los valores
de x elevados desde el cuadrado hasta el grado del polinomio: ')
mat
sumaDelosXi = sum(x)
sumaDelosYi= sum(y)
format Short
for jg=1:1:longx
xpory(jg)=x(jg)*y(jg);
xCudradopory(jg)=((x(jg))^2)*y(jg);
xTrespory(jg)=((x(jg))^3)*y(jg);
xCuatropory(jg)=((x(jg))^4)*y(jg);
end
sumaxpory=sum(xpory)
sumaxcuadradopory= sum(xCudradopory)
sumaxTrespory=sum(xTrespory)
sumaxCuatropory=sum(xCuatropory)
y= (4667643580664253*(8989195550663249/9007199254740992)^x)/2199023255552
y=2122.6 *0.998^x
end
xporlogy
xcuadrado
sumax=sum(x)
sumalogy=sum(logy)
sumaxporlogy=sum(xporlogy)
sumaxcuadrado=sum(xcuadrado)
pendiente=((longy*sumaxporlogy)(sumax*sumalogy))/((longy*sumaxcuadrado)-(sumax)^2)
interseccion= (sumalogy-(pendiente*sumax))/longy
r=10^pendiente
A=10^interseccion
X=sym('x')
funcion= A*r^X
1902.8
1973.1
2013.3
1983.5
1962.9
1909
1926.3
1957.2
1970
1897.7
1863.4
1816.5
1807.9
1801
1849.3
1902.1
1919.9
1863
1893.9
1862.9
1788.1
Y=[2235.8 2227.8 2199.5 2141.4 2005.9 1923.2 1950.8 2045.4 2122.4 2002.1 2038.5 1899.6
1984 1919.7 1859.2 1810.2 1777.4 1741.4 1752.3 1782.1 1905.8 2113.2 2318.4 2323.3 2252.8
2230.8 2450.5 2516.2 2425.8 2275.4 2129.7 2112.3 2013.8 2029.5 1955 1902.8 1973.1 2013.3
1983.5 1962.9 1909 1926.3 1957.2 1970 1897.7 1863.4 1816.5 1807.9 1801 1849.3 1902.1
1919.9 1863 1893.9 1862.9 1788.1]
X=[1:56]
Por bimestre:
Bimestre
(X)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
X=[1:26]
Y=[2231.6 2173.8 1966.8 2003.5 2055.8 2036.3 1931 1817 1747.2 1813.7 2188.1 2286.9
2381.8 2423.2 2156.2 2035.5 1941.3 1993.8 1961.9 1924.4 1944.7 1846.8 1806.4 1894.3
1874.4 1848.3]
Haciendo la regresin Polinmica:
Por trimestre:
Trimestre
(X)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1863.4
1877.3
X=[1:17]
Y=[2221.5 2025.3 2039.2 2021.1 1901.7 1764.9 1905.8 2291.8 2416.8 2228.6 2014 1960.1
1943 1943.5 1832.6 1863.4 1877.3]
Y=(145095815352541*(8956927212986577/9007199254740992)^x)/68719476736
Por semestre:
Semestre
(X)
1
2
3
4
5
6
7
8
9
X=[1:9]
Y=[2122.9 2031.2 1830.2 2082.2 2320.2 1989.1 1943.2 1847.6 1849.7]
La interpolacin polinomica:
Y= (9151*(x/2 - 1/2).*(x/3 - 2).*(x/2 - 5/2).*(x/6 - 3/2).*(x/4 7/4).*(x/5 - 8/5).*(x - 2).*(x - 4))/5 - (10411*(x/2 - 1).*(x/2 3).*(x/4 - 2).*(x/3 - 1/3).*(x/3 - 7/3).*(x/5 - 9/5).*(x - 3).*(x 5))/5 - (19891*(x/2 - 2).*(x/3 - 1).*(x/2 - 4).*(x/3 - 3).*(x/4 1/2).*(x/5 - 1/5).*(x - 5).*(x - 7))/10 - (9238*(x/2 - 3).*(x/4 1).*(x/6 - 1/3).*(x/3 - 5/3).*(x/5 - 3/5).*(x/7 - 1/7).*(x - 7).*(x 9))/5 + (11601*(x/2 - 3/2).*(x/3 - 2/3).*(x/4 - 1/4).*(x/2 7/2).*(x/3 - 8/3).*(x/4 - 9/4).*(x - 4).*(x - 6))/5 - (10156*(x/2 2).*(x/4 - 3/2).*(x/3 - 5/3).*(x/6 - 4/3).*(x/5 - 7/5).*(x/7 9/7).*(x - 1).*(x - 3))/5 + (9716*(x/2 - 5/2).*(x/3 - 4/3).*(x/4 3/4).*(x/5 - 2/5).*(x/2 - 9/2).*(x/6 - 1/6).*(x - 6).*(x - 8))/5 +
(18497*(x/3 - 2).*(x/6 - 1/2).*(x/2 - 7/2).*(x/4 - 5/4).*(x/5 4/5).*(x/7 - 2/7).*(x/8 - 1/8).*(x - 8))/10 + (21229*(x/2 - 3/2).*(x/3
- 4/3).*(x/4 - 5/4).*(x/5 - 6/5).*(x/6 - 7/6).*(x/7 - 8/7).*(x/8 9/8).*(x - 2))/10
La regresin polinomica:
Y= (2338742556688521*(8893653094953563/9007199254740992)^x)/1099511627776