MATLAB: How to go about finding the standard normal probability based on the z-score

statistics

On paper, we base the answer off the z-table
How do we do this on MatLab so that the answer can be found at any number given X?
This is what I've come up with, but I'm lacking the are under the distribution curve to the left of X
sample = [1 2 3 4 5 6 7 8 9 10];
mu = mean(sample)
sig= std(sample)
X = 5 %insert any x here, I used 5 randomly
Z = (X-mu)/(sig) %z-score

Best Answer

doc normcdf
doc normpdf
When you know what you want but not sure the name, try something like
>> lookfor normal
realmin - Smallest positive normalized floating point number.
randn - Normally distributed pseudorandom numbers.
sprandn - Sparse normally distributed random matrix.
surfnorm - Surface normals.
isonormals - Isosurface normals.
cde - cd elliptic function with normalized complex argument.
sne - sn elliptic function with normalized complex argument.
addfreqcsmenu - Add a cs menu to switch between linear and normalized frequency
convertfrequnits - converts between Normalized, Hz, kHz, etc
histfit - Histogram with superimposed fitted normal density.
jbtest - Jarque-Bera hypothesis test of composite normality.
lhsnorm - Generate a latin hypercube sample with a normal distribution
logncdf - Lognormal cumulative distribution function (cdf).
lognfit - Parameter estimates and confidence intervals for lognormal data.
logninv - Inverse of the lognormal cumulative distribution function (cdf).
lognlike - Negative log-likelihood for the lognormal distribution.
lognpdf - Lognormal probability density function (pdf).
lognrnd - Random arrays from the lognormal distribution.
lognstat - Mean and variance for the lognormal distribution.
mvncdf - Multivariate normal cumulative distribution function (cdf).
mvnpdf - Multivariate normal probability density function (pdf).
mvnrnd - Random vectors from the multivariate normal distribution.
normcdf - Normal cumulative distribution function (cdf).
normfit - Parameter estimates and confidence intervals for normal data.
norminv - Inverse of the normal cumulative distribution function (cdf).
normlike - Negative log-likelihood for the normal distribution.
normpdf - Normal probability density function (pdf).
normplot - Displays a normal probability plot.
normrnd - Random arrays from the normal distribution.
normspec - Plots normal density between specification limits.
normstat - Mean and variance for the normal distribution.
logn3fit - Fit a 3-param lognormal dist'n using cumulative probabilities.
wgtnormfit - Fitting example for a weighted normal distribution.
wgtnormfit2 - Fitting example for a weighted normal distribution (log(sigma) parameterization).
>>
Judicious search terms help but seeing the list of things related to "normal" lets you find the two functions of interest (plus a lot more depending upon which toolboxes are available, maybe) that might be of use/interest...