Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
0.0. punto fijo
1. Cálculo de la raíz de una ecuación no lineal mediante el Método Numérico del Punto_Fijo
Ing. Néstor Augusto Oyarce Linares
Utilizando macros VBA de Excel
naoyarcel@gmail.com
2. aPuntoFijoGrafica - 1
Option Explicit
Sub XY_10_Dic_2020_2()
Dim X As Double, Y As Double, i As Integer, X1 As Double, X0 As Double, XX As Double
Dim Err As Double, YD As Double, j As Integer, gx0 As Double, gx As Double
'Método Numérico de Punto Fijo
'10 de Diciembre de 2020, ejercicio 2
Cells.Clear
Cells(1, 1).Value = " ECUACION : "
Cells(3, 1).Value = " X^3+2*X^2+10*X-20"
Cells(1, 2).Value = " ENSAYOS : "
Cells(3, 2).Value = " X "
Cells(3, 3).Value = " Y "
For i = 1 To 10
X = 1 + i / 10
Y = (X) ^ (3) + 2 * (X) ^ (2) + 10 * X - 20
Cells(i + 3, 2).Value = X
Cells(i + 3, 3).Value = Y
If Y > 0 Then Exit For
Next i
End Sub
Sub Crea_grafico()
Dim grafico As ChartObject
Dim wks As Worksheet
Set wks = ActiveWorkbook.Sheets("Hoja1")
Set grafico = wks.ChartObjects.Add(Left:=400, Width:=450, Top:=50, Height:=200)
grafico.Name = "Grafico_1"
grafico.Chart.ChartType = xlXYScatterSmoothNoMarkers
grafico.Chart.SetSourceData Source:=wks.Range("B4:D15")
End Sub
' Ing. Néstor Augusto Oyarce Linares
4. bPuntoFijoCalculo - 1
Option Explicit
Sub PuntoFijoParte2()
Dim X1 As Double, X2 As Double, Y As Double, j As Integer
Dim X As Double, Error As Double, gx As Double
Cells.Clear
Cells(1, 2).Value = "Método Numérico de Punto Fijo"
Cells(1, 3).Value = "Valor de X"
Cells(1, 4).Value = "Valor de Y"
Cells(1, 5).Value = " Xf"
Cells(1, 6).Value = " Yf"
Cells(1, 7).Value = "Iteraciones"
X = 1.37
Cells(2, 3).Value = X
For j = 1 To 10
gx = 20 / (X ^ (2) + 2 * X + 10)
Error = Abs(gx - X)
X = gx
Cells(j + 2, 3).Value = X
Cells(j + 2, 4).Value = gx
If Error <= 0.0000001 Then Exit For
Next j
Y = X ^ (3) + 2 * X ^ (2) + 10 * X - 20
Cells(3, 5).Value = X
Cells(3, 6).Value = Y
Cells(3, 7).Value = j
Range("E1", "E4").Font.Bold = True
Range("E1", "E4").Font.Color = RGB(8, 44, 196)
Cells.EntireColumn.AutoFit
End Sub
' Ing. Néstor Augusto Oyarce Linares
5. Método Numérico de Punto Fijo Valor de X Valor de Y Xf Yf Iteraciones
1.37
1.368279184 1.368279184 1.368808461 7.45675E-06 11
1.369042873 1.369042873
1.368703915 1.368703915
1.368854352 1.368854352
1.368787583 1.368787583
1.368817217 1.368817217
1.368804065 1.368804065
1.368809902 1.368809902
1.368807311 1.368807311
1.368808461 1.368808461