Skip to content
Snippets Groups Projects
Commit 8fffad1b authored by Achilles Kappis's avatar Achilles Kappis
Browse files

Fix bug in ptSrcFieldTD.m to allow providing single source signal

parent 2ff8956d
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% Author: Achilles Kappis % Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com % e-mail: axilleaz@protonmail.com
% %
% Date: 14/09/2024 (DD/MM/YYYY) % Date: 15/09/2024 (DD/MM/YYYY)
% %
% Copyright: MIT % Copyright: MIT
% -------------------------------------------------- % --------------------------------------------------
...@@ -102,8 +102,8 @@ function [rSig, rSigMean, rSigMtx, rSigMtxMean, Q] = ptSrcFieldTD(sPos, rPos, fs ...@@ -102,8 +102,8 @@ function [rSig, rSigMean, rSigMtx, rSigMtxMean, Q] = ptSrcFieldTD(sPos, rPos, fs
if nargin > 3 && ~isempty(Q) if nargin > 3 && ~isempty(Q)
if isscalar(Q) if isscalar(Q)
validateattributes(Q, "numeric", {'scalar', 'real', 'nonnan', 'nonempty', 'finite', 'positive', 'integer'}, mfilename, "Length of source signals in samples", 4); validateattributes(Q, "numeric", {'scalar', 'real', 'nonnan', 'nonempty', 'finite', 'positive', 'integer'}, mfilename, "Length of source signals in samples", 4);
elseif isvector(Q) elseif isvector(Q) && size(Q, 2) == size(sPos, 1)
validateattributes(Q, "numeric", {'vector', 'real', 'nonnan', 'nonempty', 'finite', 'numel', size(sPos, 1)}, mfilename, "Source signals", 4); validateattributes(Q, "numeric", {'vector', 'real', 'nonnan', 'nonempty', 'finite', 'ncols', size(sPos, 1)}, mfilename, "Source signals", 4);
else else
validateattributes(Q, "numeric", {'3d', 'real', 'nonnan', 'nonempty', 'finite', 'ncols', size(sPos, 1)}, mfilename, "Source signals", 4); validateattributes(Q, "numeric", {'3d', 'real', 'nonnan', 'nonempty', 'finite', 'ncols', size(sPos, 1)}, mfilename, "Source signals", 4);
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment