From 143d9f094c3a9e29050a13e61b4794a36e9f70ca Mon Sep 17 00:00:00 2001
From: ZaellixA <axilleaz@protonmail.com>
Date: Tue, 17 Sep 2024 17:50:01 +0100
Subject: [PATCH] Fix bug in ptSrcFieldTD.m that would screw dimension when
 there is only one source present

---
 Sound Fields/MATLAB/Functions/ptSrcFieldTD.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m b/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m
index 422cb6e..0c17c25 100644
--- a/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m	
+++ b/Sound Fields/MATLAB/Functions/ptSrcFieldTD.m	
@@ -170,7 +170,7 @@ function [rSig, rSigMean, rSigMtx, rSigMtxMean, Q] = ptSrcFieldTD(sPos, rPos, fs
     end
 
     % Sum source signals at each receiver position
-    rSig = squeeze(sum(rSigMtx, 3));
+    rSig = reshape(sum(rSigMtx, 3), size(rSigMtx, 1), size(rSigMtx, 2), size(rSigMtx, 4));
 
     % ====================================================
     % Calculate output arguments
-- 
GitLab