Q Function
This function computes the Q function by integrating the Normal distribution.
It takes one paramter and calculates the right tail probablity.
Ex. x=q(0)
x would have the value of .5
For an arbitrary Gaussian distribution with mean, mu, and variance, sigma^2, then the function is passed this form.
((y-mu)/sigma)
Ex. Say you have a distribution of G(3,4). mu = 3, and sigma = 2. You want to calculate the right tail probability that it will be greater than 3.5. The function call would look like
answer=q((3.5-3)/2);
This is not the most efficient way of calculating this. I wrote this because I didn't have the proper toolbox. If you have the toolbox its just QFunc.
Cite As
Timothy Felty (2026). Q Function (https://www.mathworks.com/matlabcentral/fileexchange/7920-q-function), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
