You are on page 1of 1

matlab04 eng

Exercise 1 (Function functions)


Let the following piecewise continuous function be given:

sin(x) x < 0
x2
0x1
f (x) =
1
x>1
x
a) Write a function file that computes f (x) (signature: function y = f stk(x)). Ensure that a vector-valued call of the function is possible.
, ] with plot.
b) Plot the function for the interval [
2

You might also like