%MAHAM N DARD
%EE416
%PROJECT 4
%DIGITAL SIGNAL PROCESSING
%DUE:NOV 13

clear all;


%magnitude alradt given
%magnitude=20*log10(abs(H));

n=0:449             %where n can be defined as having any value between the range of 0-449
x=cos(0.2*pi*n)+sin(0.54*pi*n)+sin(0.56*pi*n)+cos(0.58*pi*n)+cos(0.9*pi*n)
[H,W]=freqz (x,1,256);
mag=abs(H);
figure(1);
plot(W/pi,mag);        %plots the function w/pi against magnitude
title('fourier');      %assigns title to the plot
xlabel('freq');         %assigns title to the x axis
ylabel('amplit X(ejw)'); %assigns title to the y axis
