Why won't this run? Getting an mldivide error.....
Mostra commenti meno recenti
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 on
polar(x,p1,'go');
hold on
polar(x,p2,'co');
hold on
polar(x,p3,'ro');
hold on
polar(x,p4,'yo');
hold on
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!