(wrote part2)
Line 72: Line 72:
  
 
==Part 2==
 
==Part 2==
not there yet. I'll get to it. promise.
+
Another non-periodic function taken at random (found [[HW1.4 Sean Ray _ECE301Fall2008mboutin| here]]) is log(x).
 +
 
 +
In order to form a periodic signal, we can take a section of a non-periodic function and repeat it on to infinity to form a periodic function.
 +
 
 +
Take for example the following MATLAB code that will repeat a section of log(x):
 +
 
 +
<pre>
 +
delta = .0001;
 +
period = 5;
 +
repetitions = 5;
 +
 
 +
t = [delta:delta:period];
 +
a = log(t);
 +
c = [];
 +
for i=1:repetitions
 +
  c = [c,a];
 +
end
 +
t = [delta:delta:period*repetitions];
 +
plot(t,c)
 +
</pre>
 +
 
 +
Note that the code only repeats the function over a finite interval, it simply is meant to demonstrate how it this would be done.
 +
 
 +
[[Image:hw2_A2_bhorst_ECE301Fall2008mboutin.png|frame|center|The output of the MATLAB code shown above]]

Revision as of 10:59, 9 September 2008

Homework 2 Ben Horst: A  :: B  :: C  :: D  :: E



Part 1

The function I chose (at random) from homework1 can be found here.

The function x(t) = cos(t) is periodic in CT, as its period is 2$ \pi $. However, it is not periodic in DT.

Here is the function sampled at a frequency of 5 samples/unit:


cos(t) sampled at 5 per unit
The sampling shown based on index













Here is the function sampled at $ {\pi \over 2} $ (as closely as MATLAB is able to approximate pi)


cos(t) shown sampled at pi/2 per unit
The sampling shown based on index













Notice that the first image of values (from the first sampling) are not periodic. There is no integer 'N' such that sampling(n) = sampling(n+N). However, in the second case, this does occur. One may observe that sampling(n) = sampling(n+10). Thus, the second case is periodic.

Part 2

Another non-periodic function taken at random (found here) is log(x).

In order to form a periodic signal, we can take a section of a non-periodic function and repeat it on to infinity to form a periodic function.

Take for example the following MATLAB code that will repeat a section of log(x):

delta = .0001;
period = 5;
repetitions = 5;

t = [delta:delta:period];
a = log(t);
c = [];
for i=1:repetitions
   c = [c,a];
end
t = [delta:delta:period*repetitions];
plot(t,c)

Note that the code only repeats the function over a finite interval, it simply is meant to demonstrate how it this would be done.

The output of the MATLAB code shown above

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood