Furthermore, MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-ineditingand debugging tools, andsupports object-oriented programming. Thesefactors make MATLAB an excellent tool for teaching and research. MATLAB has many advantages compared to conventional computer languages (e.g.
x
— Values at which to evaluate pdf
scalar value | array of scalar values
Values at which to evaluate the pdf, specified as a scalar value or an array of scalar values.
To evaluate the pdf at multiple values, specify
x
using an array. To evaluate the pdfs of multiple distributions, specify mu
and sigma
using arrays. If one or more of the input arguments x
, mu
, and sigma
are arrays, then the array sizes must be the same. In this case, normpdf
expands each scalar input into a constant array of the same size as the array inputs. Each element in y
is the pdf value of the distribution specified by the corresponding elements in mu
and sigma
, evaluated at the corresponding element in x
.Example:
[-1,0,3,4]
Data Types:
single
| double
mu
— Mean
0
(default) | scalar value | array of scalar values
Mean of the normal distribution, specified as a scalar value or an array of scalar values.
To evaluate the pdf at multiple values, specify
x
using an array. To evaluate the pdfs of multiple distributions, specify mu
and sigma
using arrays. If one or more of the input arguments x
, mu
, and sigma
are arrays, then the array sizes must be the same. In this case, normpdf
expands each scalar input into a constant array of the same size as the array inputs. Each element in y
is the pdf value of the distribution specified by the corresponding elements in mu
and sigma
, evaluated at the corresponding element in x
.![Matlab Pdf Matlab Pdf](https://it.mathworks.com/help/examples/stats/win64/PlotthepdfofaWeibullDistributionExample_01.png)
Example:
[0 1 2; 0 1 2]
Data Types:
single
| double
sigma
— Standard deviation
1
(default) | positive scalar value | array of positive scalar values
Standard deviation of the normal distribution, specified as a positive scalar value or an array of positive scalar values.
To evaluate the pdf at multiple values, specify
x
using an array. To evaluate the pdfs of multiple distributions, specify mu
and sigma
using arrays. If one or more of the input arguments x
, mu
, and sigma
are arrays, then the array sizes must be the same. In this case, normpdf
expands each scalar input into a constant array of the same size as the array inputs. Each element in y
is the pdf value of the distribution specified by the corresponding elements in mu
and sigma
, evaluated at the corresponding element in x
.Example:
[1 1 1; 2 2 2]
Data Types:
single
| double
- Matlab Tutorial
- MATLAB Advanced
- MATLAB Useful Resources
- Selected Reading
MATLAB is a programming language developed by MathWorks. It started out as a matrix programming language where linear algebra programming was simple. It can be run both under interactive sessions and as a batch job. This tutorial gives you aggressively a gentle introduction of MATLAB programming language. It is designed to give students fluency in MATLAB programming language. Problem-based MATLAB examples have been given in simple and easy way to make your learning fast and effective.
This tutorial has been prepared for the beginners to help them understand basic to advanced functionality of MATLAB. After completing this tutorial you will find yourself at a moderate level of expertise in using MATLAB from where you can take yourself to next levels.
We assume you have a little knowledge of any computer programming and understand concepts like variables, constants, expression, statements, etc. If you have done programming in any other high-level programming language like C, C++ or Java, then it will be very much beneficial and learning MATLAB will be like a fun for you.