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

 
 

bug #40564: statistics package: nanvar

Submitted by:  None
Submitted on:  Wed 13 Nov 2013 10:27:07 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NoneAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
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
  • -unavailable- added by asnelt (Posted a comment)
  • -unavailable- added by carandraug (Arno Onken - maintainer of the statistics package)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 16 Nov 2013 09:19:36 PM UTCcarandraugOpen/ClosedOpen=>Closed
    Wed 13 Nov 2013 02:30:11 PM UTCcarandraugSummarynanvar=>statistics package: nanvar
      Carbon-Copy-=>Added -unavailable-
    Wed 13 Nov 2013 10:27:07 AM UTCNoneAttached File-=>Added test.bin, #29606

    Back to the top


    Powered by Savane 3.1-cleanup1