% function to generate signal of prescribed length % Usage: [j,x] = makesignal(N) % % where j are index from 0 to N-1 % x are the generated signals % N is the length of the series function [j,x] = makesignal(N) % these declare and initialize j and x with length N. j = zeros(N,1); x = zeros(N,1); % this makes j = 0, 1, ..., N-1 j = 0:N - 1; % this is the part you have to modify for pset4, Q3 m = 1; x = cos(2*pi*m*j/N); % To plot and see what the signal looks like, type % >> plot(j,x);