Code covered by the BSD License  

Highlights from
Two dimensional Q-function

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 1.36 KB File ID: #28480

Two dimensional Q-function

by Hassan Moradi

 

13 Aug 2010 (Updated 17 Sep 2010)

This m-file numerically calculates the value of two dimensional Gaussian Q function.

| Watch this File

File Information
Description

Matlab code for calculation of 2d Gaussian Q function.

General description
    This m-file provide a numerical computation of two-dimensional Gaussian Q-function, that is
        Q(x1,x2,ro)=1/((1/sqrt(2*pi)*(1-ro^2))*int(int(exp(-(x^2+y^2-2roxy)/(2*(1-ro^2))) dxdy

The result may include a very small approximation error.

How to use it
    To use the the file in your own program, just download the file and save it in the same path that your file is. You can call the 2d qfunction by:
answer=q2d(x1,x2,ro)
where x1 and x2 are the limit of the integrals and ro is the correlation coefficient.

Example:
>> q2d(-1.2,.3,.4)

ans =

    0.3671

>>

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
17 Sep 2010

Adding some comments and an example.

Tag Activity for this File
Tag Applied By Date/Time
2d qfunction Hassan Moradi 16 Aug 2010 10:09:58
two dimensional qfunction Hassan Moradi 16 Aug 2010 10:09:59

Contact us at files@mathworks.com