(New page: <pre> % Periodic Signal with frequency 1 Hz. t=[0:0.001:40]; y=sin(t); plot(t,y); % Sampling Frequency 0.25 Hz t=[0:4:40]; y2 = sin(t); figure plot(t,y2); </pre>) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | == Part 1 == | ||
+ | |||
<pre> | <pre> | ||
− | % Periodic Signal with frequency | + | % Periodic Signal with frequency 2*pi Hz. |
t=[0:0.001:40]; | t=[0:0.001:40]; | ||
y=sin(t); | y=sin(t); | ||
Line 11: | Line 13: | ||
plot(t,y2); | plot(t,y2); | ||
</pre> | </pre> | ||
+ | |||
+ | [[ image:parta.jpg _ECE301Fall2008mboutin]] | ||
+ | |||
+ | == Part 2 == | ||
+ | <pre> | ||
+ | t=[0:0.1:35]; | ||
+ | y=cos(t)+cos(pi*t); | ||
+ | y4=y; | ||
+ | for k=0:10:20000 | ||
+ | y2=cos(t-k)+cos(pi*(t-k)); | ||
+ | y4=y4+y2; | ||
+ | end | ||
+ | plot(t,y); % non-periodic Signal | ||
+ | figure | ||
+ | plot(t,y4); % almost preiodic signal | ||
+ | </pre> | ||
+ | |||
+ | [[ image:parta2.jpg _ECE301Fall2008mboutin]] |
Latest revision as of 16:07, 9 September 2008
Part 1
% Periodic Signal with frequency 2*pi Hz. t=[0:0.001:40]; y=sin(t); plot(t,y); % Sampling Frequency 0.25 Hz t=[0:4:40]; y2 = sin(t); figure plot(t,y2);
File:Parta.jpg ECE301Fall2008mboutin
Part 2
t=[0:0.1:35]; y=cos(t)+cos(pi*t); y4=y; for k=0:10:20000 y2=cos(t-k)+cos(pi*(t-k)); y4=y4+y2; end plot(t,y); % non-periodic Signal figure plot(t,y4); % almost preiodic signal