function [x, y, z] = hw06p6noisydata(n) % hw06p6noisydata - produce 3 column vectors x, y, z of length n for Problem 5 in hw6 % % Return vectors x,y for the noisy data points and vector z of 'noiseless' function values seed = 11; rng(seed); sc = 0.2; x = linspace(0, 1, n)'; z = sin(pi*x); y = z + sc*(2*rand(n,1) - 1); end