0% found this document useful (0 votes)
137 views1 page

MATLAB Assignment: Functions & Curves

The document provides instructions for a MATLAB assignment involving writing a user-defined function to calculate standard deviation and plotting cubic curves with different parameter values of c. Students are asked to write a function called std_dev that calculates standard deviation based on a given equation. They are also asked to print two pictures with cubic curves using parameter values of c equal to 2 and -2 as well as values slightly above and below those.

Uploaded by

luchi_babez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views1 page

MATLAB Assignment: Functions & Curves

The document provides instructions for a MATLAB assignment involving writing a user-defined function to calculate standard deviation and plotting cubic curves with different parameter values of c. Students are asked to write a function called std_dev that calculates standard deviation based on a given equation. They are also asked to print two pictures with cubic curves using parameter values of c equal to 2 and -2 as well as values slightly above and below those.

Uploaded by

luchi_babez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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