21 lines
360 B
Matlab
21 lines
360 B
Matlab
clear all
|
|
close all
|
|
clc
|
|
|
|
%%%%%%%%%%%%%%%%%%
|
|
%function power = frequencySpectrum(signal, fs)
|
|
%
|
|
% Task: Display the power spectrum (lin and log scale) of a given signal
|
|
%
|
|
% Input:
|
|
% - signal: the input signal to process
|
|
% - fs: the sampling rate
|
|
%
|
|
% Output:
|
|
% - power: the power spectrum
|
|
%
|
|
%
|
|
% Thomas Périn, thomas.perin@ecam.fr
|
|
% 20/04/2023
|
|
%%%%%%%%%%%%%%%%%%
|