create to plot the filtered signal

This commit is contained in:
Tikea TE 2025-04-16 14:49:41 +02:00
parent 5ba653331e
commit 50874a3e58
1 changed files with 29 additions and 0 deletions

29
plotFilteredSignal.m Normal file
View File

@ -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