octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41407] Implementation of qfunc in comm packag


From: Tony Richardson
Subject: [Octave-bug-tracker] [bug #41407] Implementation of qfunc in comm package
Date: Thu, 30 Jan 2014 18:25:13 +0000
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?41407>

                 Summary: Implementation of qfunc in comm package
                 Project: GNU Octave
            Submitted by: amrichardson
            Submitted on: Thu 30 Jan 2014 06:25:12 PM GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Tony Richardson
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: Any

    _______________________________________________________

Details:

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





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41407>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]