bugGNU Octave - Bugs: bug #40564, statistics package: nanvar

 
 

bug #40564: statistics package: nanvar

Submitter:  None
Submitted:  Wed 13 Nov 2013 10:27:07 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 16 Nov 2013 09:08:36 PM UTC, comment #1: 

Good point. I edited nanstd to make sure that its output is real. nanvar calls nanstd. The change will be in the next release of the statistics package.

Thanks,
Arno

Arno Onken <asnelt>
Wed 13 Nov 2013 10:27:07 AM UTC, original submission:  

Hello,

I am getting complex or real number outputs from nanvar.m  depending on the array dimensions. The type of output change from complex to real but the real part remains the same. I (and the scripts I wrote) are not expecting this kind of change: variance is by definition a real number.

Code:
load test.bin
data_var1 = (nanvar(data_aux(:,:),0,1));
data_var2 = (nanvar(data_aux(:,1:5),0,1));

display(data_var1(1:5))
display(data_var2(1:5))

And you will get for data_var1(1:5) :
"          NaN -        NaNi          NaN -        NaNi   2.5990e+15 + 0.0000e+00i   1.2460e+17 + 0.0000e+00i   9.3657e+16 + 0.0000e+00i"

And for data_var2(1:5):
"          NaN                        NaN   2.5990e+15              1.2460e+17   9.3657e+16"

Perhaps the better is to guarantee a real output using real(v) ?

Best regards,
eddc


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29606:  test.bin added by None (200KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by asnelt (Posted a comment)
  • -email is unavailable- added by carandraug (Arno Onken - maintainer of the statistics package)
  •  

    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
    2013-11-16 carandraug Open/ClosedOpen Closed
    2013-11-13 carandraug Summarynanvar statistics package: nanvar
        Carbon-Copy- Added -email is unavailable-
    2013-11-13 None Attached File- Added test.bin, #29606

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code