Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % 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)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement