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
884d1890
Commit
884d1890
authored
Nov 23, 2017
by
Jan-Gerrit Richter
Browse files
minor bugfixes in itaHRTF and added reduce_spatial empty function
parent
18b7f42e
Changes
3
Hide whitespace changes
Inline
Side-by-side
applications/Binaural-HRTF/HRTF_class/@itaHRTF/interp.m
View file @
884d1890
...
...
@@ -50,7 +50,8 @@ function cThis = interp(this,varargin)
sArgs
=
struct
(
'order'
,
50
,
'eps'
,
1e-5
,
'shiftToEar'
,
false
,
'shiftAxis'
,
'y'
,
'shiftOffset'
,[
-
0.0725
0.0725
]);
sArgs
=
ita_parse_arguments
(
sArgs
,
varargin
,
2
);
if
~
isa
(
varargin
{
1
},
'itaCoordinates'
),
error
(
'itaHRTF:interp'
,
' An itaCoordinate object is needed!'
)
if
isempty
(
varargin
)
||
~
isa
(
varargin
{
1
},
'itaCoordinates'
)
error
(
'itaHRTF:interp'
,
' An itaCoordinate object is needed!'
)
end
field_in
=
varargin
{
1
};
...
...
applications/Binaural-HRTF/HRTF_class/@itaHRTF/itaHRTF.m
View file @
884d1890
...
...
@@ -117,6 +117,7 @@ classdef itaHRTF < itaAudio
methods
% Special functions that implement operations that are usually performed only on instances of the class
%% Input
function
this
=
itaHRTF
(
varargin
)
iniAudio
=
[];
% initialize itaHRTF with itaAudio properties (only for nargin == 1)
if
nargin
>
1
||
(
nargin
==
1
&&
(
ischar
(
varargin
{
1
})
||
isa
(
varargin
{
1
},
'itaAudio'
)))
iniAudio
=
[];
...
...
@@ -1017,7 +1018,7 @@ classdef itaHRTF < itaAudio
end
end
% function
this = interp(varargin)
this
=
interp
(
varargin
)
;
%
% Function to calculate HRTFs for arbitrary field points using a N-th order
% spherical harmonics (SH) interpolation / range extrapolation, as described in [1],
...
...
@@ -1055,7 +1056,8 @@ classdef itaHRTF < itaAudio
% Version: 2016-02-05
this
=
reduce_spatial
(
this
,
coords
,
varargin
);
% Function to spatially reduce the HRTF.
function
this
=
smooth_linphase
(
this
,
varargin
)
% function this = smooth_linphase(varargin)
...
...
applications/Binaural-HRTF/HRTF_class/@itaHRTF/reduce_spatial.m
0 → 100644
View file @
884d1890
function
[
cThis
]
=
reduce_spatial
(
this
,
newCoordinates
,
varargin
)
%
% This function is used to reduce the spatial sampling from the current
% directions. This is done with a findnearest search. For a reduction to
% interpolated values use interp
%
% INPUT:
%
%
% OUTPUT:
%
%
%
% Author: Jan-Gerrit Richter <jri@akustik.rwth-aachen.de>
% Version: 2017-11-23
end
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