Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
458eec75
Commit
458eec75
authored
Nov 17, 2016
by
Jonas Stienen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.rwth-aachen.de/ita/toolbox
parents
618f72b2
37c61750
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
18 deletions
+14
-18
applications/SphericalHarmonics/ita_sph_mimo_error_simulation.m
...ations/SphericalHarmonics/ita_sph_mimo_error_simulation.m
+10
-9
applications/SphericalHarmonics/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m
...cs/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m
+3
-8
kernel/StandardRoutines/ita_parse_arguments.m
kernel/StandardRoutines/ita_parse_arguments.m
+1
-1
No files found.
applications/SphericalHarmonics/ita_sph_mimo_error_simulation.m
View file @
458eec75
...
...
@@ -137,12 +137,13 @@ for idxRun = 1:sArgs.nRuns
equalizationRadSource
=
2
;
% room transfer function (free field assumption at this point)
Psi
=
sph_transfer_path
(
posReceiver
,
receiverNmax
,
posSource
,
sourceNmax
,
kVec
,
...
'r'
,
distSourceReceiver
,
'r_eq'
,
equalizationRadSource
,
'norm'
,
false
);
PsiAliasReceiver
=
sph_transfer_path
(
posReceiver
,
receiverNmaxAlias
,
posSource
,
sourceNmax
,
kVec
,
...
'r'
,
distSourceReceiver
,
'r_eq'
,
equalizationRadSource
,
'norm'
,
false
);
PsiAliasSource
=
sph_transfer_path
(
posReceiver
,
receiverNmax
,
posSource
,
sourceNmaxAlias
,
kVec
,
...
Psi
=
sph_transfer_path
(
posReceiver
,
receiverNmaxAlias
,
posSource
,
sourceNmaxAlias
,
kVec
,
...
'r'
,
distSourceReceiver
,
'r_eq'
,
equalizationRadSource
,
'norm'
,
false
);
PsiAliasReceiver
=
Psi
(
1
:(
receiverNmaxAlias
+
1
)
^
2
,
1
:(
sourceNmax
+
1
)
^
2
,:);
PsiAliasSource
=
Psi
(
1
:(
receiverNmax
+
1
)
^
2
,
1
:(
sourceNmaxAlias
+
1
)
^
2
,:);
Psi
=
Psi
(
1
:(
receiverNmax
+
1
)
^
2
,
1
:(
sourceNmax
+
1
)
^
2
,:);
if
~
isempty
(
samplingDisplacement
)
&&
isempty
(
SNR
)
% rest happens inside loop, only here in case of an error
...
...
@@ -178,7 +179,7 @@ for idxRun = 1:sArgs.nRuns
if
isempty
(
dirMeasurementFile
)
sourceBalias
=
ita_sph_modal_strength
(
sourceSampling
,
sourceNmaxAlias
,
kVec
(
idxFreq
),
'rigid'
,
'transducer'
,
'ls'
);
sourceB
=
sourceBalias
(
1
:(
sourceNmax
+
1
)
^
2
,
1
:(
sourceNmax
+
1
)
^
2
);
if
numel
(
unique
(
sourceSampling
.
r
))
==
1
;
if
numel
(
unique
(
sourceSampling
.
r
))
==
1
Msource
=
sourceB
*
(
sourceG
.
'.*sourceY'
);
else
Msource
=
sourceB
.*
(
sourceG
.
'.*sourceY'
);
...
...
@@ -237,7 +238,7 @@ for idxRun = 1:sArgs.nRuns
% alias error needed here since antialias bf needs them and parfor
% requires the variables to be initialized
if
simSMA
if
numel
(
unique
(
receiverSampling
.
r
))
==
1
;
if
numel
(
unique
(
receiverSampling
.
r
))
==
1
EreceiverAlias
=
receiverYalias
*
receiverBalias
;
else
EreceiverAlias
=
receiverYalias
.*
receiverBalias
;
...
...
@@ -542,7 +543,7 @@ data = fft(data);
if
isEven
data
=
data
(
1
:(
nSamples
+
2
)/
2
,:,:);
else
disp
lay
(
'MBE_FFT:: Be careful with odd numbers of time samples!'
);
disp
(
'MBE_FFT:: Be careful with odd numbers of time samples!'
);
data
=
data
(
1
:(
nSamples
+
1
)/
2
,:,:);
end
...
...
@@ -558,4 +559,4 @@ if strcmp(signalType,'power')
end
end
end
\ No newline at end of file
end
applications/SphericalHarmonics/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m
View file @
458eec75
...
...
@@ -18,15 +18,10 @@ nSH = (nmax+1).^2;
filename
=
[
'/Womersley/md'
num2str
(
nmax
,
'%02d'
)
'.'
num2str
(
nSH
,
'%04d'
)];
% filepath = '~/MATLAB/Griddata';
% if ~exist(filepath,'dir')
% error(['Griddata folder missing: ' filepath])
url
=
'http://www.ita-toolbox.org/Griddata'
;
hyper
=
str2num
(
urlread
([
url
filename
]));
%#ok<ST2NM>
% else
% hyper = load([filepath filename]);
% end
url
=
'http://www.ita-toolbox.org/Griddata'
;
hyper
=
str2num
(
urlread
([
url
filename
]));
%#ok<ST2NM>
s
=
itaSamplingSph
(
hyper
(:,
1
:
3
),
'cart'
);
s
.
r
=
ones
(
s
.
nPoints
,
1
);
s
.
weights
=
hyper
(:,
4
);
s
.
nmax
=
nmax
;
kernel/StandardRoutines/ita_parse_arguments.m
View file @
458eec75
...
...
@@ -115,7 +115,7 @@ for idx = 1:length(field_token)
token
=
field_token
{
idx
};
if
numel
(
token
)
>=
5
% RSC - support for arguments shorter than 5 elements
if
strcmpi
(
token
(
1
:
3
),
'pos'
)
&&
strcmpi
(
token
(
5
),
'_'
)
pos_num
=
s
tr2double
(
token
(
4
));
%this is the fixed position number in the argument list
pos_num
=
s
scanf
(
token
(
4
)
,
'%d'
);
%this is the fixed position number in the argument list
token_new
=
token
(
6
:
end
);
%get rid off prefix
if
pos_num
<=
numel
(
Arguments
)
% rsc - check if enough arguments are given
value
=
Arguments
{
pos_num
};
%get value/object
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment