ASN10 - Quadrature sampling demonstration

From Class Wiki
Revision as of 12:10, 3 December 2009 by Jodi.Hodge (talk | contribs)
Jump to navigation Jump to search

Back to my home page

Assignment was actually done in class by professor.

link title
Problem Statement

Plot

Solution

While we can't sum to infinity in the computer, we can get a close approximation summing over a large enough range of

I found summing over was about the most the computer could handle reasonably.

The following script was written in MATLAB to produce the desired plot.

clear all;
close all;
sum = 0;
T = 1;
t = -T:0.0001:T;
N = 1000;
for n = 1:N;
     if n==0
          h = 0;
     else
          h = 2/T;
     end
     sum = sum+h*sin(2*pi*n*t/T);
end
plot(t,sum)
title('Quadrature Sampling Waveform')
xlabel('time(T)')
ylabel('Sampling Waveform')


Running the MATLAB script above gives us the following plot.

Quadrature sampling.jpg