Reputation: 55
I just started to learn R for my statistics class and I need to plot the curve with following parametrization:
I tried this, but not sure whether it's correct:
x <- seq(0,2*pi)
t <- choose(sin(2*x), cos(3*x) )
plot(t)
Because I get different curve on WolframAlpha
Upvotes: 1
Views: 60
Reputation: 947
You can simply use curve() to plot mathematical expression in R.
curve(choose(sin(2*x), cos(3*x)), from=0, to=2*pi)
Upvotes: 1