I have function y=x^5+x^8+ (cos(x))^3; I need to get random x; random y; and after that determine whether y below or above the given function. I tried a lot of version. but my code even doesnt work....plz help with this expressions ;( I am a begiiner in R -- View this message in context: http://r.789695.n4.nabble.com/area-under-the-curve-tp4649943.html Sent from the R help mailing list archive at Nabble.com.
area under the curve
4 messages · Rlotus, Uwe Ligges
I mean i need to put random x in equation in order to determine value y. i used runif....but it doesn work... y= (runif(0,1))^5+(runif(0,1))^8+((cos runif(0,1)))^3; (<=it doesnt work properly) now i have value y.... need to determine whether y is above or below my function..... so after that y1=runif(1,0,3); -- View this message in context: http://r.789695.n4.nabble.com/area-under-the-curve-tp4649943p4649944.html Sent from the R help mailing list archive at Nabble.com.
On 18.11.2012 18:37, Rlotus wrote:
I have function y=x^5+x^8+ (cos(x))^3; I need to get random x; random y; and after that determine whether y below or above the given function. I tried a lot of version. but my code even doesnt work....plz help with this expressions ;( I am a begiiner in R
Show us your code and we can give hints what you did wrong. But at first, please do read the posting guide http://www.R-project.org/posting-guide.html Uwe ligges
-- View this message in context: http://r.789695.n4.nabble.com/area-under-the-curve-tp4649943.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at 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 commented, minimal, self-contained, reproducible code.
Which message are you referring to? Please quote. And please read the posting guide to the mailing list that asks you to do that!
On 18.11.2012 18:55, Rlotus wrote:
I mean i need to put random x in equation in order to determine value y. i used runif....but it doesn work... y= (runif(0,1))^5+(runif(0,1))^8+((cos runif(0,1)))^3; (<=it doesnt work properly)
The above line is not valid R code.
now i have value y.... need to determine whether y is above or below my function..... so after that y1=runif(1,0,3);
Some more precise English and more precise questions could help non-native English speakers (like myself) to understand your problem. Uwe Ligges
-- View this message in context: http://r.789695.n4.nabble.com/area-under-the-curve-tp4649943p4649944.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at 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 commented, minimal, self-contained, reproducible code.