(→Part 2) |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Choose the signal <math>x(t)=cos(t)</math> which is periodic. | Choose the signal <math>x(t)=cos(t)</math> which is periodic. | ||
− | [[image:ctsignal. | + | [[image:ctsignal.jpg|300px|frame|center]] |
Sampling ever interger yields | Sampling ever interger yields | ||
Line 13: | Line 13: | ||
==Part 2== | ==Part 2== | ||
+ | This is <math>x(t)=e^{-t}cos(20t)</math> as the nonperiodic signal. | ||
+ | [[image:ctsignal3.jpg|300px|frame|center]] | ||
+ | |||
+ | |||
+ | I haven't played around with matlab enough to know how to create the signal needed with my own code, so I used the same code that Ben Laskowski used: | ||
+ | |||
+ | ---- | ||
+ | "y=zeros(size(x)); | ||
+ | |||
+ | for count=1:period/delta:(nperiod+8)*period/delta | ||
+ | |||
+ | y(1,count:size(y,2))=y(1,count:size(y,2))+f(1,1:size(y,2)-count+1); | ||
+ | |||
+ | end | ||
+ | |||
+ | plot(x,y)" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[image:ctsignal4.jpg|300px|frame|center]] |
Latest revision as of 14:14, 12 September 2008
Part 1
Choose the signal $ x(t)=cos(t) $ which is periodic.
Sampling ever interger yields
This is $ x[n]=cos(n) $
but sampling at a frequency of $ \pi/4 $ yields
This is $ x[n]=cos(\pi/4n) $
Part 2
This is $ x(t)=e^{-t}cos(20t) $ as the nonperiodic signal.
I haven't played around with matlab enough to know how to create the signal needed with my own code, so I used the same code that Ben Laskowski used:
"y=zeros(size(x));
for count=1:period/delta:(nperiod+8)*period/delta
y(1,count:size(y,2))=y(1,count:size(y,2))+f(1,1:size(y,2)-count+1);
end
plot(x,y)"