+ > p2<-function(r){
+ gama=0
+ for(i in 1:1000){
+ c=caminho[[4]]
+ for(i in 1:caminho[[3]]+1) {
+ c=c+caminho[[i+3]]*((r[i])^(i-1))
+ d=(abs(c))*exp(-(x^2/2))}
+ gama=gama + ( d/(h(r[i])) ) }
+ return(gama)}
> e3<-p2(r)
OBS: r is a rnorm(1000,0,1)
> caminho
theta_chapeu f_estrela k a0 a1 a2
someone? please i really need this
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide co
> p<-function(x){
+ for(i in 1:teste2[k]+1){
+ p2=c+teste2[3+i]*x^(i-1)
+ c=p2}
+ return(c)}
> p3<-p(x)
if i make this i can use a p(x) calling a function in anohter function? no ,
right?
[[alternative HTML version deleted]]
__
R-help@r-proj
teste2
theta_chapeu f_estrela k a0 a1 a2 a3
13.21.2 3 2 1 4 5
> p<-function(k){
+ i<-1
+ for(i in 1:k){
+ p2=teste2[3+i]}
+ return(p2)}
> > p3- p3
a2
1 4
> p3[1]
a2
1 4
how i can make an array with the polinomyal function?
lilke p3[1]=1 p3[2]=4 p3[3]=5
i wanna compare functions
to be simple , let's say i want x^2 and x^5 in same plot ( it's not the
case but if i get it i'll understand for others )
how i do it?
x<-seq(-10, 10, l=100)
> plot(x^2)
and?
tks
[[alternative HTML version deleted]]
by the way, i want both in the same figure, not side by side or others..
tks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pro
6 matches
Mail list logo