bugGNU Octave - Bugs: bug #49872, Polar plot incorrect

 
 

bug #49872: Polar plot incorrect

Submitter:  None
Submitted:  Sat 17 Dec 2016 07:14:59 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Arvind Rao Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 18 Dec 2016 10:40:43 AM UTC, comment #3: 

Thanks Andreas. I see the problem was in the expression, not in Octave.

Anonymous
Sat 17 Dec 2016 08:22:31 PM UTC, comment #2: 

You can also have a look here: http://josoansi.de/octave_plot_compare/compare_plot_demos_06.html

for the first demo of polar.m. As you can see Matlab does the same for negative RHO values as Octave.

Andreas Weber <andy1978>
Group Member
Sat 17 Dec 2016 08:17:37 PM UTC, comment #1: 

Why do you think this is wrong?

I guess you want an output generated like "polar(phi, abs(U))", right?

Can you confirm that Matlab does behave differently as Octave for negative values of RHO?

Andreas Weber <andy1978>
Group Member
Sat 17 Dec 2016 07:14:59 PM UTC, original submission:  

I am using Win 7. I wrote a simple program to plot a cardioid.

Program is below:

Plot is fine for b=1, 0.75, 0.5. When I change b to 1/3 or 0.25, the plot is wrong. The smaller lobe is expected to be to the left of the larger lobe instead of inside it. Plot for 0.25 is attached.


phi = 0:1:359;
phi = phi * 2 * pi / 360;

# b is the parameter which changes the directivity of the mic
# Type            b
# Omnidirectional 1.00
# Sub-Cardioid    0.75
# Cardioid        0.5
# Super-Cardioid  1/3
# Hyper-Cardioid  0.25
# Figure of 8     0

b = 0.25;
# U is the output signal of a first order directional mic
U = b + (1 - b) * cos(phi);
polar (phi, U)


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #39261:  hyper_cardioid_plot_bug.pdf added by None (7KiB - application/pdf - Plot for 0.25)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-18 rik5 Open/ClosedOpen Closed
    2016-12-17 andy1978 StatusNone Works For Me
        Operating SystemMicrosoft Windows Any
    2016-12-17 None Attached File- Added hyper_cardioid_plot_bug.pdf, #39261

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code