Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
76ca9f86
Commit
76ca9f86
authored
Nov 15, 2016
by
Marco Berzborn
Browse files
some minor changes
parent
f9901cb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/SphericalHarmonics/ita_sph_mimo_error_simulation.m
View file @
76ca9f86
...
...
@@ -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 @
76ca9f86
...
...
@@ -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
;
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment