calculate the integral

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

calculate the integral

R help mailing list-2
helloplease can anyone help me, I find it difficult to calculate this integrali have this programmx<-rnorm(10,0,1)y<-rexp(10,2)z<-exp(10,3)s<-vector()for (  j in 1:10)s[j]<-x[j+1]+x[j]s1[i]<-s[j]/2f<-function(y,u){exp(y-u)}sapply(x, function(i){
 z[j] integrate(f,lower=s1[j],upper=,s1[j+1] x=i)$value
for each value of x I will have a vectori can't calculate thisthank you in advance








        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: calculate the integral

Bert Gunter-2
Is this homework? This list has a no homework policy.

Also, please stop posting in html.

Bert Gunter


On Wed, Oct 24, 2018 at 6:40 AM malika yassa via R-help <
[hidden email]> wrote:

> helloplease can anyone help me, I find it difficult to calculate this
> integrali have this
> programmx<-rnorm(10,0,1)y<-rexp(10,2)z<-exp(10,3)s<-vector()for (  j in
> 1:10)s[j]<-x[j+1]+x[j]s1[i]<-s[j]/2f<-function(y,u){exp(y-u)}sapply(x,
> function(i){
>  z[j] integrate(f,lower=s1[j],upper=,s1[j+1] x=i)$value
> for each value of x I will have a vectori can't calculate thisthank you in
> advance
>
>
>
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.