create to plot the filtered signal
This commit is contained in:
parent
5ba653331e
commit
50874a3e58
|
|
@ -0,0 +1,29 @@
|
|||
function plotFilteredSignal(signal, Fs)
|
||||
%{
|
||||
function plotFilteredSignal(signal, Fs)
|
||||
Ex: plotFilteredSignal(filteredSignal, 200)
|
||||
|
||||
Task:
|
||||
Plot a filtered signal in the time domain.
|
||||
|
||||
Inputs:
|
||||
- signal: the filtered signal to display
|
||||
- Fs: sampling frequency in Hz
|
||||
|
||||
Author: Tikea TE
|
||||
Date: 16/04/2025
|
||||
%}
|
||||
|
||||
% Create time vector
|
||||
N = length(signal);
|
||||
t = (0:N-1) / Fs;
|
||||
|
||||
% Plot
|
||||
figure;
|
||||
plot(t, signal, 'b');
|
||||
xlabel('Time (s)');
|
||||
ylabel('Amplitude (a.u.)');
|
||||
title('Filtered Signal');
|
||||
grid on;
|
||||
|
||||
end
|
||||
Loading…
Reference in New Issue