Problem title

Contents

(a) Title of first part

Description and comments and observations and so on

format compact              % tells Matlab not to print blank lines between answers
v1 = [-1;2;2]
v2 = [2;-1;2]
innerproduct = dot(v1,v2)   % gives zero, i.e. v1 and v2 are orthogonal
v1 =
    -1
     2
     2
v2 =
     2
    -1
     2
innerproduct =
     0

(b) Title of second part

Description and comments and observations and so on

x = 0:.1:10;                % use semicolon for stuff you don't want to print!
plot(x,sin(x),x,cos(x))
legend('sin(x)','cos(x)')

(c) Title of third part

Note that Matlab is very picky about the format: