help-octave
[Top][All Lists]
Advanced

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

Fwd: qfunc/qfuncinv implementation in communications package


From: Richardson, Anthony
Subject: Fwd: qfunc/qfuncinv implementation in communications package
Date: Thu, 24 Jan 2013 21:33:30 +0000

 

 
------ Original Message ------
From: Przemek Klosowski
Date: 1/24/2013 3:05 PM
To: address@hidden;
Subject: Re: qfunc/qfuncinv implementation in communications package

 

On 01/24/2013 02:26 PM, Richardson, Anthony wrote:
> The function qfunc() in the communications package is currently
> implemented as:
>
> y = 1-normcdf(x);
>
> This returns 0 for values of x greater than approx. 8 (where normcdf()
> is close to 1).  I believe a better implementation is:
>
> y = erfc(x/sqrt(2))/2;
>
> A simple test to compare the two implementations is:
>
> x = [0:3:18]; [qfunc(x); erfc(x/sqrt(2))/2]
>


Octave 3.6.3 returns zero for both forms:
[x=[0:3:18]' qfunc(x) erfc(x/sqrt(2))/2]

     0.000000000000000    0.500000000000000    0.500000000000000
     3.000000000000000    0.001349898031630    0.001349898031630
     6.000000000000000    0.000000000986588    0.000000000986588
     9.000000000000000    0.000000000000000    0.000000000000000
    12.000000000000000    0.000000000000000    0.000000000000000
    15.000000000000000    0.000000000000000    0.000000000000000
    18.000000000000000    0.000000000000000    0.000000000000000

_______________________________________________
Are you using the default display "format"  (scientific notation)?

 

Tony


reply via email to

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