This task is in sheet "5uzd"
I found equation solution. q(3)
I have a problem doing this task. I push the button, but in Cell(8,3) don't write real formula with numbers.
This task is in sheet "5uzd"
I found equation solution. q(3)
I have a problem doing this task. I push the button, but in Cell(8,3) don't write real formula with numbers.
real formula should be "y=(k+5)^n1+b*k^n2+c*k" with real n1,b,n2,c numbers.
I found how to write this "y=(k+5)^n1+b*k^n2+c*k" like text
Edited programm.
Private Sub CommandButton1_Click()
Dim q(3), y(3), e(3)
Range("a8:b100").Clear
b = Cells(3, 2)
c = Cells(3, 3)
d = Cells(3, 4)
n1 = Cells(5, 1): n2 = Cells(5, 2)
q(1) = Cells(5, 4): q(2) = Cells(5, 5)
y1 = 0: k = 0
60 q(3) = (q(1) + q(2)) / 2
For i = 1 To 3
k = k + 1
y(i) = (q(i) + 5) ^ n1 + b * q(i) ^ n2 + c * q(i)
e(i) = y(i) - y1
Cells(9 + k, 1).Value = q(i)
Cells(9 + k, 2).Value = y(i)
Next i
If Sgn(e(1)) = Sgn(e(2)) Then
Cells(8, 1).Value = "Intervale šaknies nėra": GoTo 80
End If
If Sgn(e(1)) = Sgn(e(3)) Then
q(1) = q(3)
End If
If Sgn(e(2)) = Sgn(e(3)) Then
q(2) = q(3)
End If
If Abs(y(1) - y(2)) > 0.01 Then
GoTo 60
End If
Cells(8, 1).Value = "Lygties šaknis": Cells(8, 3).Value = q(3)
Cells(9, 1).Value = "Lygtis"
Cells(9, 2). Value = "y=(k+5)^n1+b*k^n2+c*k"
80 '
End Sub
When I changed these numbers in Cells ( b = Cells(3, 2) , c = Cells(3, 3) ,d = Cells(3, 4) , n1 = Cells(5, 1): n2 = Cells(5, 2))
I need that my formula in Cell (9,2) update new numbers
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks