function [x, y, z] = m2noisydata(n)
% m2noisydata - produce 3 column vectors x, y, z of length n for Problem 5 on M2
%
% (x,y) are the noisy data points and (x,z) are the 'noiseless' data points
    seed = 11;
    rng(seed);
    sc = 0.2;
    x = linspace(0, pi/2, n)';
    z = 2 ./ cosh(x) + sin(x);
    y = z + sc*(2*rand(n,1) - 1);
end