diff --git a/matlab/tfgm/utils/compute_dgt.m b/matlab/tfgm/utils/compute_dgt.m index f37e9dc88cb9e0dc330a9b8552e77e775ea8e252..2acde818760e1d905494a5989d531ad2cf7030e3 100644 --- a/matlab/tfgm/utils/compute_dgt.m +++ b/matlab/tfgm/utils/compute_dgt.m @@ -1,13 +1,15 @@ function tf_mat = compute_dgt(x, dgt) %% tf_mat = compute_dgt(x, dgt) -% This function computes the time-frequency (TF) matrix from a signal +% This function computes the time-frequency (TF) Discrete Gabor transform +% (DGT) of a signal % % Input: -% - x: signal. must be a vector -% - dgt :gabor transform operator +% - x (nd array): Input signal. must be a vector +% - dgt(handle function) :gabor transform operator +% (see utils/get_stft_operators.m) % Output: -% -tf_mat: TF matrix -% +% -tf_mat: TF matrix - DGT coefficients +% % Author : A. Marina KREME % e-mail : ama-marina.kreme@lis-lab.fr/ama-marina.kreme@univ-amu.fr % Created: 2020-28-01 diff --git a/matlab/tfgm/utils/compute_idgt.m b/matlab/tfgm/utils/compute_idgt.m index 72243bc33715cca4728d72ca03680d2e059b8c0f..8a45b0c63d9af3bd6301d0cf518fb4a68167ba25 100644 --- a/matlab/tfgm/utils/compute_idgt.m +++ b/matlab/tfgm/utils/compute_idgt.m @@ -1,13 +1,15 @@ function x = compute_idgt(tf_mat, idgt) %% x = compute_idgt(tf_mat, idgt) -% This function reconstruct a signal form its the time-frequency (TF) matrix +% Inverse discrete Gabor transform +% This function reconstruct a signal form its the time-frequency (TF) matrix % % Input: -% - tf_mat: TF matrix -% - idgt: inverse of gabor transform operator +% - tf_mat (nd array): TF matrix - DGT coefficients +% - idgt (handle function): inverse of gabor transform operator +% (see utils/get_stft_operators.m) % Output: -% -x: reconstructed signal -% +% -x (ndarray): reconstructed signal +% % Author : A. Marina KREME % e-mail : ama-marina.kreme@lis-lab.fr/ama-marina.kreme@univ-amu.fr % Created: 2020-28-01 @@ -15,4 +17,4 @@ function x = compute_idgt(tf_mat, idgt) x = idgt(tf_mat); -end \ No newline at end of file +end \ No newline at end of file diff --git a/matlab/tfgm/utils/get_stft_operators.m b/matlab/tfgm/utils/get_stft_operators.m index b42074d2927e1c87d15430a957bf59c777266a7e..6b41613a4d945b03f259cd237ef99150b8b189a7 100644 --- a/matlab/tfgm/utils/get_stft_operators.m +++ b/matlab/tfgm/utils/get_stft_operators.m @@ -5,12 +5,19 @@ function [dgt, idgt, varargout] = get_stft_operators(dgt_params, signal_params, % functions that generate the DGT operators. % % Inputs: -% - dgt_params: struct that contains the DGT parameters. See generate_dgt_parameters.m -% - signal_params: structure which contains the sampling frequency as well as the signal length +% - dgt_params: struct that contains the DGT parameters. +% see tf_tools/generate_dgt_parameters.m +% - signal_params: structure which contains the sampling frequency +% as well as the signal length +% see tf_tools/generate_signal_parameters.m % - phase_conv : Compute a DGT using a frequency-invariant phase. % % Outputs: -% +% - dgt (handle fucntion) : DGT operator +% - idgt (handle fucntion) : IDGT operator +% - pseudoinverse_dgt (handle fucntion) : Pseudo-inverse of DGT +% +% % Author : A. Marina KREME % e-mail : ama-marina.kreme@lis-lab.fr/ama-marina.kreme@univ-amu.fr % Created: 2020-28-01 @@ -37,8 +44,7 @@ pseudoinverse_dgt = @(x)idgtreal(x, wd, dgt_params.hop, dgt_params.nbins, L, pha varargout{1} = pseudoinverse_dgt; - - + end