bugGNU Octave - Bugs: bug #41407, Implementation of qfunc in comm...

 
 

bug #41407: Implementation of qfunc in comm package

Submitted by:  Tony Richardson <amrichardson>
Submitted on:  Thu 30 Jan 2014 06:25:12 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Tony RichardsonOpen/Closed: Closed
Release: 3.6.4Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 22 Mar 2015 02:29:32 PM UTC, comment #1:

Hi Tony, thanks for your bug report and so sorry that this got lost in the flood for so long!

I have implemented your suggestion, this fix will be in the next bugfix release of the communications package:

http://hg.code.sf.net/p/octave/communications/rev/f988b498e891

Mike Miller <mtmiller>
Project Administrator
Thu 30 Jan 2014 06:25:12 PM UTC, original submission:

Is it possible to replace the current definition of qfunc in the communications package with this one?

function y = qfunc2(x)
y = erfc(x/sqrt(2))/2;
end

The current implementation returns 0 for arguments greater than about 8. (It implements qfunc as 1 - normcdf(x) and so relies on the differences between two numbers that are both about 1.) The implementation above relies on erfc and is good down to machine precision. It doesn't return 0 until the argument is greater than about 38. The following script illustrates the differences:

k = 0:0.01:20;
figure(1)
subplot(2,1,1)
semilogy(k, qfunc2(k));
ax = axis();
subplot(2,1,2)
semilogy(k, qfunc(k));
axis(ax);

qfuncinv suffers from similar problems, but unfortunately the fix is not so simple. Octave's implementation of erfcinv returns Inf for arguments smaller than about 1e-17. MATLAB's implementation doesn't return Inf until the argument is less than 1e-320 or so. (I know that such small probabilities are uncommon in "regular"
statistics, but not uncommon in digital communications where we may be interested in the probability of one bit error in a billion/trillion/gazillion.)

Tony Richardson

Tony Richardson <amrichardson>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by amrichardson (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Mar 2015 02:29:32 PM UTCmtmillerStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1