problem with the polar commend

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with the polar commend

insafba
Hello there,
I have a pretty long equation that I want to plot using polar coordinates.
Please see the equation below
  <http://octave.1599824.n4.nabble.com/file/t373159/equation_octave.png>
The problem is when I write it in octave and trying to plot it using
polar(theta, r), the figure is empty!! nothing is plotted!
could you please help me with this? thank you so much

here is the code

theta= 0:0.02:2*pi;

r = sqrt(((b^2).*(cos(theta)).^2 + (a^2).*(sin(theta)).^2 -
abs((b^2).*(cos(theta)).^2 + (a^2).*(sin(theta)).^2)) ./
(2*(cos(theta)).^2.*(sin(theta)).^2));

polar(theta, r)



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: problem with the polar commend

Doug Stewart-4


On Mon, Jan 7, 2019 at 4:51 PM insafba <[hidden email]> wrote:
Hello there,
I have a pretty long equation that I want to plot using polar coordinates.
Please see the equation below
  <http://octave.1599824.n4.nabble.com/file/t373159/equation_octave.png>
The problem is when I write it in octave and trying to plot it using
polar(theta, r), the figure is empty!! nothing is plotted!
could you please help me with this? thank you so much

here is the code

theta= 0:0.02:2*pi;

r = sqrt(((b^2).*(cos(theta)).^2 + (a^2).*(sin(theta)).^2 -
abs((b^2).*(cos(theta)).^2 + (a^2).*(sin(theta)).^2)) ./
This should be a minus        ^

 
(2*(cos(theta)).^2.*(sin(theta)).^2));

polar(theta, r)



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html




--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: problem with the polar commend

insafba
In reply to this post by insafba
Thank you som much, that's work!



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html