I would like to draw a simple sin
and such a function
in a R plot.
I am using this code:
plot(sin, 0, 2*pi)
curve((4sin+(1/3)sin(3x))/pi, xlim = c(0, 2*pi), n = 1001, col = "blue", add = TRUE)
but I get this error:
Error: unexpected symbol in "curve((4sin"
What should I do to solve this problem?
You don't like the * symbol?
plot(sin, 0, 2*pi)
curve(4*(sin(x)+(1/3)*sin(3*x))/pi, xlim = c(0, 2*pi), n = 1001, col = "blue", add = TRUE)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.