Professional Documents
Culture Documents
Introduction to MATLAB
1. Write a user-defined function std_dev (stored in std_dev.m file) defined by the shown equation.
std _ dev
1 n 1
x(i) xaverage 2
n i 1
The function takes vector x as a parameter and computes its standard deviation where xaverage is the average value of the vector and n is its number of elements (note: n = length(x))
Print 2 pictures, each including 3 curves in this family, corresponding to the following parameter values: c=2 c = -2 A value of c slightly above c = 2 A value of c slightly below c = 2 A value of c slightly above c = -2 A value of c slightly below c = -2.