Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
23-09-2020IntNewtform
# Forma de Newton por diferenças divididas x=seq(0,1,by=0.1);x f<-function(s){ log(s^2*sin(s)+cos(s)) } curve(f,0,1) y=f(x);y points(x,y,col="red") n=length(x) A=matrix(0,n,n) A[,1]=y for ( i in 2:n){ for (j in 1:(n+1-i)){ A[j,i]=(A[j,i-1]-A[j+1,i-1])/(x[j]-x[j+i-1]) } } A # Polinômio interpolador na forma de Newton # # p(s)=f[x0]+f[x0,x1](x-x0)+f[x0,x1,x2](x-x0)(x-x1)+...+f[x0,x1,x2,...,xn](x-x0)(x-x1)...(x-x(n-1)) N<-function(i,s){ p=1 for (j in 1:i){p=p*(s-x[j])} p } PoliNewt<-function(s){ p=A[1,1] for ( i in 2:(n-1)){p=p+A[1,i]*N(i-1,s)} p } curve(PoliNewt,0,1) points(x,y,col="red")
run
|
edit
|
history
|
help
0
Outlier
Project2.Question1
jcruet_bi variate r regression
Ex15-12
31-08-2020-Exemplo AjusteNaoL
Área de parábolas via séries de Arquimedes e Cálculo
data framing 2
Dendrogramm_Clusteranalyse_Länderflächen_euclid_average
Mietflächen clustern für flächenbasierte Prognosen
Monroe Week 9 Homework