Determination of Psd with Wave Forms

By
Advertisement
clc;
clear all;
close all;
N=1024;
fs=8000;
f1=input('enter the 1st freuency');
f2=input('enter the 2nd freuency');
f3=input('enter the 3rd freuency');
n=0:N-1;
x=sin(2*pi*(f1/fs)*n)+sin(2*pi*(f2/fs)*n)+sin(2*pi*(f3/fs)*n);
figure(1)
pxx=spectrum(x,N)
specplot(pxx,fs);
grid ON;
xlabel('freq hz');
ylabel('mag in db');
title('power spectrum of x(n)');


0 comments:

Post a Comment