Commit 884d1890 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

minor bugfixes in itaHRTF and added reduce_spatial empty function

parent 18b7f42e
...@@ -50,7 +50,8 @@ function cThis = interp(this,varargin) ...@@ -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 = struct('order',50,'eps',1e-5,'shiftToEar',false,'shiftAxis','y','shiftOffset',[-0.0725 0.0725]);
sArgs = ita_parse_arguments(sArgs,varargin,2); 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 end
field_in = varargin{1}; field_in = varargin{1};
......
...@@ -117,6 +117,7 @@ classdef itaHRTF < itaAudio ...@@ -117,6 +117,7 @@ classdef itaHRTF < itaAudio
methods % Special functions that implement operations that are usually performed only on instances of the class methods % Special functions that implement operations that are usually performed only on instances of the class
%% Input %% Input
function this = itaHRTF(varargin) function this = itaHRTF(varargin)
iniAudio = [];
% initialize itaHRTF with itaAudio properties (only for nargin == 1) % initialize itaHRTF with itaAudio properties (only for nargin == 1)
if nargin > 1 || (nargin == 1 && (ischar(varargin{1}) || isa(varargin{1},'itaAudio'))) if nargin > 1 || (nargin == 1 && (ischar(varargin{1}) || isa(varargin{1},'itaAudio')))
iniAudio = []; iniAudio = [];
...@@ -1017,7 +1018,7 @@ classdef itaHRTF < itaAudio ...@@ -1017,7 +1018,7 @@ classdef itaHRTF < itaAudio
end end
end end
% function this = interp(varargin) this = interp(varargin);
% %
% Function to calculate HRTFs for arbitrary field points using a N-th order % Function to calculate HRTFs for arbitrary field points using a N-th order
% spherical harmonics (SH) interpolation / range extrapolation, as described in [1], % spherical harmonics (SH) interpolation / range extrapolation, as described in [1],
...@@ -1055,7 +1056,8 @@ classdef itaHRTF < itaAudio ...@@ -1055,7 +1056,8 @@ classdef itaHRTF < itaAudio
% Version: 2016-02-05 % 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(this,varargin)
% function this = smooth_linphase(varargin) % function this = smooth_linphase(varargin)
......
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment