Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Virtual Sensing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPAH
IN-NOVA
Virtual Sensing
Commits
f5488901
Commit
f5488901
authored
7 months ago
by
Achilles Kappis
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug in input argument checks in ptSrcFieldTD.m
parent
c73cc7eb
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Update to v0.2.3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sound Fields/MATLAB/Functions/ptSrcFieldTD.m
+6
-5
6 additions, 5 deletions
Sound Fields/MATLAB/Functions/ptSrcFieldTD.m
with
6 additions
and
5 deletions
Sound Fields/MATLAB/Functions/ptSrcFieldTD.m
+
6
−
5
View file @
f5488901
...
...
@@ -93,15 +93,16 @@ function [rSig, rSigMean, rSigMtx, rSigMtxMean, Q] = ptSrcFieldTD(sPos, rPos, fs
validateattributes
(
Q
,
"numeric"
,
{
'scalar'
,
'real'
,
'nonnan'
,
'nonempty'
,
'finite'
,
'positive'
,
'integer'
},
mfilename
,
"Length of source signals in samples"
,
4
);
else
validateattributes
(
Q
,
"numeric"
,
{
'3d'
,
'real'
,
'nonnan'
,
'nonempty'
,
'finite'
,
'ncols'
,
size
(
sPos
,
1
)},
mfilename
,
"Source signals"
,
4
);
nTrials
=
size
(
Q
,
3
);
end
else
Q
=
128
;
end
if
nargin
>
4
&&
~
isempty
(
nTrials
)
&&
isscalar
(
Q
)
validateattributes
(
nTrials
,
"numeric"
,
{
'scalar'
,
'positive'
,
'nonnan'
,
'nonempty'
,
'finite'
},
mfilename
,
"Number of trials/sound field realisations"
,
5
);
elseif
nargin
>
4
&&
isempty
(
nTrials
)
if
~
isscalar
(
Q
)
nTrials
=
size
(
Q
,
3
);
elseif
nargin
>
4
&&
~
isempty
(
nTrials
)
&&
isscalar
(
Q
)
validateattributes
(
nTrials
,
"numeric"
,
{
'scalar'
,
'positive'
,
'nonnan'
,
'nonempty'
,
'finite'
},
mfilename
,
"Number of trials/sound field realisations"
,
5
);
else
nTrials
=
1
;
end
...
...
@@ -130,7 +131,7 @@ function [rSig, rSigMean, rSigMtx, rSigMtxMean, Q] = ptSrcFieldTD(sPos, rPos, fs
% Calculate signals
% ====================================================
% Go through the trials/sound field realisations
for
jIdx
=
size
(
Q
,
3
)
:
-
1
:
1
for
jIdx
=
nTrials
:
-
1
:
1
% Go through the sources (calculate for all receivers in one go)
for
sIdx
=
size
(
dist
,
1
):
-
1
:
1
rSigMtx
(:,
:,
sIdx
,
jIdx
)
=
(
1.
/
dist
(
sIdx
,
:))
.*
delayseq
(
Q
(:,
sIdx
,
jIdx
),
del
(
sIdx
,
:),
fs
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment