Created
July 26, 2017 02:21
-
-
Save stephenHartzell/049924468f37f84b90ddb5a18c86b0a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Define parameters | |
| Fs = 10; % Sampling Frequency | |
| Ts = 1/Fs; % Sampling Period | |
| N = 32; % Total Number of Samples | |
| n = 0:N-1; % Samples | |
| t = Ts*(n); % Sampled times | |
| y = cos(2*pi*t); % Discrete signal | |
| % Plot the signal and its discrete counter-part | |
| figure | |
| stem(t,y,'filled') | |
| hold on; | |
| % The 'continuous signal' (interpolated and highly sampled signal) | |
| plot(linspace(min(t),max(t),length(0:.01:max(t))),cos(2*pi*(0:.01:max(t)))) | |
| title(['Sampled Signal with Fs = ',num2str(Fs)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment