How do I make a polar plot of the function r=2sin(3t)sin(t) for 0<t<2pi?
11 views (last 30 days)
Show older comments
Joseph Mandap
on 18 Oct 2014
Answered: MUHAMMAD AIMAN ASYRAF
on 24 Jun 2021
How do I make a polar plot of the function r=2sin(3t)sin(t) for 0<t<2pi?
I'm using this command
t=linspace(o,2*pi,200);
r=2*sin(3t)*sin(t)
polar(t,r)
0 Comments
Accepted Answer
Star Strider
on 18 Oct 2014
You’re almost there! You need to vectorise your code (replace (*) with (.*)), substitute ‘0’ for ‘o’ in your linspace call, and insert a ‘*’ multiplication operator:
t=linspace(0,2*pi,200);
r=2*sin(3*t).*sin(t);
polar(t,r)
2 Comments
More Answers (1)
See Also
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!