I need to graph the equation p for varying g values in polar coordinates I assume from 0 to 2pi radians. Here is my code, i know it isnt the best way to go about coding it but i wanted somethign simple
g=0;ga=0.1;gb=0.5;gc=0.9;gd=0.99;x=[0:0.1:2*pi];p=(1/4*pi)*((1-g^2)/((1+g^2-2*g*cos(x))^1.5));p1=(1/4*pi)*((1-ga^2)/((1+ga^2-2*ga*cos(x))^1.5));p2=(1/4*pi)*((1-gb^2)/((1+gb^2-2*gb*cos(x))^1.5));p3=(1/4*pi)*((1-gc^2)/((1+gc^2-2*gc*cos(x))^1.5));p4=(1/4*pi)*((1-gd^2)/((1+gd^2-2*gd*cos(x))^1.5));polar(p,'bo');hold onpolar(x,p1,'go');hold onpolar(x,p2,'co');hold onpolar(x,p3,'ro');hold onpolar(x,p4,'yo');hold on
Best Answer