From c73cc7eb76740224a6e148eb2112f919aab75ea0 Mon Sep 17 00:00:00 2001
From: ZaellixA <axilleaz@protonmail.com>
Date: Fri, 13 Sep 2024 17:18:51 +0100
Subject: [PATCH] Add the source signals as output argument for ptSrcFieldTD.m

---
 Sound Fields/MATLAB/Functions/ptSrcFieldTD.m | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m b/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m
index 8301398..f470b8b 100644
--- a/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m	
+++ b/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m	
@@ -58,6 +58,10 @@
 %                        source averaged over the trials/sound field
 %                        realisations. This is an IxMxN array.
 % 
+% Q [numeric]: The source signals. If Q is provided, the same variable is
+%              returned here. If Q is generated internally, the signals are
+%              returned.
+% 
 % --------------------------------------------------
 % Notes
 % 
@@ -68,12 +72,12 @@
 %   long source signals
 % 
 % --------------------------------------------------
-function [rSig, rSigMean, rSigMtx, rSigMtxMean] = ptSrcFieldTD(sPos, rPos, fs, Q, nTrials, c)
+function [rSig, rSigMean, rSigMtx, rSigMtxMean, Q] = ptSrcFieldTD(sPos, rPos, fs, Q, nTrials, c)
     % ====================================================
     % Check for number of arguments
     % ====================================================
     narginchk(3, 6);
-    nargoutchk(0, 4);
+    nargoutchk(0, 5);
 
     % ====================================================
     % Validate input arguments
-- 
GitLab