These functions are called built-ins. Many standard mathematical functions, such as sin(x), cos(x), tan(x), ex, ln(x), are evaluated by the functions sin, cos, tan, exp, and log respectively in MATLAB. Table 2.1 lists some commonly used functions, where variables x and y can be numbers, vectors, or matrices. The last two examples show how vectors can be used to specify which non-contiguous rows and columns to use. For example the last example should return columns 1, 4, 5 and 6 of rows 3, 4 and 5. 5 Constructs MATLAB provides the for, whileand ifconstructs. MATLAB will wait for you to type the endstatement before it executes the construct.
Create a standard normal distribution object with the mean equal to 0 and the standard deviation equal to 1.
Define the input vector x to contain the values at which to calculate the pdf.
Compute the pdf values for the standard normal distribution at the values in x.
Each value in y corresponds to a value in the input vector x. For example, at the value x equal to 1, the corresponding pdf value y is equal to 0.2420.
![Simple matlab example Simple matlab example](/uploads/1/2/5/0/125063931/205463321.png)
Alternatively, you can compute the same pdf values without creating a probability distribution object. Use the
pdf
function, and specify a standard normal distribution using the same parameter values for and .The pdf values are the same as those computed using the probability distribution object.
Create a Poisson distribution object with the rate parameter, , equal to 2.
Define the input vector x to contain the values at which to calculate the pdf.
Compute the pdf values for the Poisson distribution at the values in x.
Each value in y corresponds to a value in the input vector x. For example, at the value x equal to 3, the corresponding pdf value in y is equal to 0.1804.
Alternatively, you can compute the same pdf values without creating a probability distribution object. Use the
pdf
function, and specify a Poisson distribution using the same value for the rate parameter, .The pdf values are the same as those computed using the probability distribution object.
Create a standard normal distribution object.
Specify the
x
values and compute the pdf. Plot the pdf.
Create a Weibull probability distribution object.
![Matlab Matlab](/uploads/1/2/5/0/125063931/508899790.jpg)
Specify the
x
values and compute the pdf. Matlab Gui Examples Pdf
Plot the pdf.