Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Análisis Numérico I
Licenciatura en Matemáticas
Asignatura: Análisis numérico I
Unidad 1.- Fundamentos
Actividad 2.-Modelacion Matemática
Alumna: Elda Josefina Vázquez Calderón
Grupo: MT-MANU1-2102-B2-001
Matricula: ES1822028919
Docente: Elsa Frías Silver
Propósito:
En esta actividad practicarás como resolver numéricamente una ecuación el método de Newton.
Indicaciones:
La tarea es crear una función en Octave que recibe dos parámetros y regresa un escalar que representará la
altura del proyectil en cada tiempo 𝑡. Deberás mostrar la trayectoria ℎ(𝑡) seguida para las siguientes valores
de 𝑣 y vectores 𝑡
V Vectores de T
10 (0,10,100)
25 (0,20,250)
100 (0,50,300)
Para definir la serie de valores donde aplicarás tu función, es decir, todos los valores 𝑡 tienes que hacer uso
de la función linspace de la siguiente manera
>>> t = linspace(0,10,100)
Que quiere decir que 𝑡 es un vector con valores reales entre 0 y 10 con 100 puntos distribuidos
equidistantemente
Tip: Para definir una función, llamada funcX, de n parámetros en Octave la sintaxis es la siguiente
function y = funcX(n1,n2,…,nk)
function y = funcX(x,y)
Tip 2: Octave permite el uso de operaciones puntuales, es decir, extiende la aplicación de la suma, producto
y división (entre otras) a vectores, lo que significa que puedes sumar dos vectores de manera implícita de la
siguiente forma. Supongamos que X e Y son vectores,
>>> Z = X*.Y
El operador punto (.) le indica a Octave que tiene que multiplicar el elemento i-ésimo de X por el elemento
iésimo de Y y construir al mismo tiempo el vector Z de tal forma que
Si tenemos la función funcM que es una función que recibe un solo parámetro y regresa un escalar,
entonces podemos aplicarla a todo el vector X de la siguiente forma
Z = funcM(X)
Solución del ejercicio: primero editamos los parámetros de la función de la siguiente manera
Sin linspace:
function y=parabolico(v);
g=9.8;
x= 10;
y=v*x+((1/2)*-g*x.^2);
endfunction
>>> y=parabolico(0)
y=
Columns 1 through 6:
0.00000 -0.04999 -0.19998 -0.44995 -0.79992 -1.24987
Columns 7 through 12:
-1.79982 -2.44975 -3.19967 -4.04959 -4.99949 -6.04938
Columns 13 through 18:
-7.19927 -8.44914 -9.79900 -11.24885 -12.79869 -14.44853
Columns 19 through 24:
-16.19835 -18.04816 -19.99796 -22.04775 -24.19753 -26.44730
Columns 25 through 30:
28.79706 -31.24681 -33.79655 -36.44628 -39.19600 -42.04571
Columns 31 through 36:
-44.99541 -48.04510-51.19478 -54.44444 -57.79410 -61.24375
Columns 37 through 42:
-64.79339 -68.44302 -72.19263 -76.04224 -79.99184 -84.04142
Columns 43 through 48:
-88.19100 -92.44057 -96.79012 -101.23967 -105.78921 -110.43873
Columns 49 through 54:
-115.18825 -120.03775 -124.98725 -130.03673 -135.18621 -140.43567
Columns 55 through 60:
-145.78512 -151.23457 -156.78400 -162.43343 -168.18284 -174.03224
Columns 61 through 66:
-179.98163 -186.03102 -192.18039 -198.42975 -204.77910 -211.22845
Columns 67 through 72:
-217.77778 -224.42710 -231.17641 -238.02571 -244.97500 -252.02428
Columns 73 through 78:
>>> y=parabolico(100)
y=
Columns 1 through 6:
0.00000 10.05102 20.00204 29.85308 39.60412 49.25518
Columns 7 through 12:
58.80624 68.25732 77.60841 86.85950 96.01061 105.06173
Columns 13 through 18:
114.01286 122.86399 131.61514 140.26630 148.81747 157.26865
Columns 19 through 24:
165.61983 173.87103 182.02224 190.07346 198.02469 205.87593
Columns 25 through 30:
213.62718 221.27844 228.82971 236.28099 243.63228 250.88358
Columns 31 through 36:
258.03489 265.08622 272.03755 278.88889 285.64024 292.29160
Columns 37 through 42:
298.84298 305.29436 311.64575 317.89715 324.04857 330.09999
Columns 43 through 48:
336.05142 341.90287 347.65432 353.30579 358.85726 364.30874
Columns 49 through 54:
369.66024 374.91174 380.06326 385.11478 390.06632 394.91787
Columns 55 through 60:
399.66942 404.32099 408.87256 413.32415 417.67575 421.92735
Columns 61 through 66:
426.07897 430.13060 434.08224 437.93388 441.68554 445.33721
Columns 67 through 72:
448.88889 452.34058 455.69228 458.94399 462.09570 465.14743
Columns 73 through 78:
468.09917 470.95092 473.70268 476.35445 478.90623 481.35802
Columns 79 through 84:
483.70983 485.96164 488.11346 490.16529 492.11713 493.96898
Columns 85 through 90:
495.72084 497.37272 498.92460 500.37649 501.72840 502.98031
Columns 91 through 96:
504.13223 505.18416 506.13611 506.98806 507.74003 508.39200
Columns 97 through 100:
508.94399 509.39598 509.74798 510.0000