From 873090bfbb7b45c2d97456f3bc601966598e9179 Mon Sep 17 00:00:00 2001
From: Marina Kreme <amamarinak@gmail.com>
Date: Sat, 21 Nov 2020 07:15:18 +0100
Subject: [PATCH] add doc

---
 matlab/tfgm/utils/compute_dgt.m        | 12 +++++++-----
 matlab/tfgm/utils/compute_idgt.m       | 14 ++++++++------
 matlab/tfgm/utils/get_stft_operators.m | 16 +++++++++++-----
 3 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/matlab/tfgm/utils/compute_dgt.m b/matlab/tfgm/utils/compute_dgt.m
index f37e9dc..2acde81 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 72243bc..8a45b0c 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 b42074d..6b41613 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
 
-- 
GitLab