You are on page 1of 1

United Arab Emirates University Faculty of Engineering Faculty Requirement Unit

Introduction to Programming GENG 200 1st Semester- 2012/2013 Assignment No. 4

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))

2. Consider the following family of plane cubic curves defined by:


y 2 x 3 3x c

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.

You might also like