Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
92e77ef8
Commit
92e77ef8
authored
May 15, 2019
by
Philipp Schäfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ita_result2audio_spk
-now expects nBins instead of fftDegree
parent
891440e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
kernel/ClassStuff/ita_result2audio_spk.m
kernel/ClassStuff/ita_result2audio_spk.m
+4
-5
No files found.
kernel/ClassStuff/ita_result2audio_spk.m
View file @
92e77ef8
function
audioObj
=
ita_result2audio_spk
(
resultObj
,
samplingRate
,
fftDegree
,
varargin
)
function
audioObj
=
ita_result2audio_spk
(
resultObj
,
samplingRate
,
nBins
,
varargin
)
%ita_result2audio_spk - Converts an itaResult with frequency data into
%itaAudio using interpolation and extrapolation in the frequency domain
% Data outside of the valid frequency range is extrapolated with zeros.
% Optionally, a filter can be applied.
%
% Syntax: itaResult = ita_result2audio_spk(itaResult, samplingRate,
fftDegree
, Options)
% Syntax: itaResult = ita_result2audio_spk(itaResult, samplingRate,
nBins
, Options)
%
% Options (default):
% filter ('none'): 'none', 'lowpass', 'highpass', 'bandpass'
...
...
@@ -24,8 +24,8 @@ function audioObj = ita_result2audio_spk(resultObj, samplingRate, fftDegree, var
thisFuncStr
=
[
upper
(
mfilename
)
':'
];
%% Initialization and Input Parsing
sArgs
=
struct
(
'pos1_data'
,
'itaResult'
,
'pos2_samplingRate'
,
'integer'
,
'pos3_
fftDegree'
,
'numeric
'
);
ita_parse_arguments
(
sArgs
,{
resultObj
,
samplingRate
,
fftDegree
});
sArgs
=
struct
(
'pos1_data'
,
'itaResult'
,
'pos2_samplingRate'
,
'integer'
,
'pos3_
nBins'
,
'integer
'
);
ita_parse_arguments
(
sArgs
,{
resultObj
,
samplingRate
,
nBins
});
assert
(
logical
(
resultObj
.
isFreq
),
[
thisFuncStr
'Data must be in frequency domain.'
])
sArgs
=
struct
(
'filter'
,
'none'
,
'filterorder'
,
20
);
...
...
@@ -34,7 +34,6 @@ doLowPass = isequal(sArgs.filter, 'bandpass') || isequal(sArgs.filter, 'lowpass'
doHighPass
=
isequal
(
sArgs
.
filter
,
'bandpass'
)
||
isequal
(
sArgs
.
filter
,
'highpass'
);
doBandPass
=
isequal
(
sArgs
.
filter
,
'bandpass'
);
[
~
,
nBins
]
=
ita_get_nSamples
(
fftDegree
);
fMin
=
resultObj
.
freqVector
(
1
);
fMax
=
resultObj
.
freqVector
(
end
);
...
...
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