probability distribution function (normal distribution)
by Sherif Omran
02 May 2009
(Updated 19 Jun 2009)
This function calculates the probability under the normal distribution curve
|
Watch this File
|
| File Information |
| Description |
This function calculates the probability under the normal distribution curve, plots the graph and the area calculated.
%Normaldistribution
%
% calculating the area under a normal distribution curve
% from -ve infinity upto point x.
%
% Input:
% x : point on the normal distribution curve
% mean : mean of the normal distribution curve
% sigma : standard deviation of the normal distribution curve
% (hint: normal dist mean=0, sigma=1)
% plotting: Plot the calculated area if plotting = 1
% Output: area under the curve.
%
% Example:
% x=[-20:20] % your data points
% sigma=length(x)/2/3.5 % PDF width is 3.5 sigma
% mean=0 % mean between -20 and 20
% normaldistribution(0, mean, sigma,1) % Calculate area from -inf to 0
%
%
% Author:
% Sherif Omran
% University and university hospital of Zurich
% Date: May 2009
% Part of my phd thesis:
% email: sherif.omran@gmx.de
%-------------------------------------------------------------------------% |
| MATLAB release |
MATLAB 7.6 (R2008a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 04 May 2009 |
corrected the title: from prbability into probability |
| 19 Jun 2009 |
Added an example on how to use it |
|
Contact us at files@mathworks.com