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
efede6e9
Commit
efede6e9
authored
Jan 18, 2017
by
Markus Mueller-Trapet
Browse files
include weights for beampattern calculation
parent
483d6b05
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/SignalProcessing/Beamforming/ita_beam_beampattern.m
View file @
efede6e9
...
...
@@ -47,7 +47,11 @@ sArgs = struct('pos1_array','itaMicArray','pos2_f','numeric','pos3_steering_th',
%% do the calculation
% positions of array microphones
arrayPositions
=
array
.
cart
;
if
isempty
(
array
.
weights
)
||
numel
(
array
.
weights
)
~=
array
.
nPoints
weights
=
array
.
w
;
else
weights
=
array
.
weights
;
end
% make a matrix with spherical coordinates for the unit sphere with
% given angular resolution
resolution
=
1
;
...
...
@@ -67,7 +71,7 @@ k = 2*pi*f/double(ita_constants('c'));
v
=
squeeze
(
ita_beam_steeringVector
(
k
,
arrayPositions
,
scanPositions
,
sArgs
.
wavetype
));
% ... and multiply with the manifold vector for the steering
% direction to get the beampattern
v_steer
=
ita_beam_steeringVector
(
k
,
arrayPositions
,
steer_vec
,
sArgs
.
wavetype
)
.'
;
v_steer
=
weights
(:)
.*
ita_beam_steeringVector
(
k
,
arrayPositions
,
steer_vec
,
sArgs
.
wavetype
)
.'
;
v
=
v
'*
v_steer
.
/
sum
(
abs
(
v_steer
)
.^
2
);
B
=
reshape
(
v
,
numel
(
theta
),
numel
(
phi
));
...
...
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