Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
03-08-2020-Derivada-Numerica
# Derivada Numérica f<-function(x){x^2+x+3} dfn<-function(x,h){ (f(x+h)-f(x))/h } f(1) dfn(1,0.00001) # Outro exemplo g<-function(u){x=u[1]; y=u[2] p=x^2+y^2 p } dgx<-function(u,h){x=u[1]; y=u[2] v=u; v[1]=u[1]+h p= (g(v)-g(u))/h p } dgy<-function(u,h){x=u[1]; y=u[2] v=u; v[2]=u[2]+h p= (g(v)-g(u))/h p } gradg<-function(u,h){ c(dgx(u,h),dgy(u,h)) } u=c(1,2) g(u) dgx(u,0.000001) dgy(u,0.000001) gradg(u,0.000001) # Testando
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Teste
26-08-2020AjusteCurva
此次次
This is python
28-09-2020Int-poli-inter-FuncaoComportadabem
Grade.r
R_Prog
Applying table() to each column of a matrix
Quiz 2
Linear regression Model [Empirical Models]
Please log in to post a comment.