Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
toolbox
Commits
6fbd973c
Commit
6fbd973c
authored
7 years ago
by
Markus Mueller-Trapet
Browse files
Options
Downloads
Patches
Plain Diff
preserve units
parent
5ecb9091
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/DSP/Transformation/ita_psd.m
+3
-5
3 additions, 5 deletions
kernel/DSP/Transformation/ita_psd.m
with
3 additions
and
5 deletions
kernel/DSP/Transformation/ita_psd.m
+
3
−
5
View file @
6fbd973c
...
...
@@ -16,8 +16,6 @@ function varargout = ita_psd(varargin)
% blocksize (signal_length): FFT-Size for psd or cpsd
% fftsize ([]): expand signal to this fftsize by adding zeros, no reduction will be done, if fftsize < blocksize nothing will happen!
%
% TODO HUHU: Speed improvements
%
% See also ita_roomacoustics, ita_sqrt, ita_roomacoustics_reverberation_time, ita_roomacoustics_reverberation_time_hirata, ita_roomacoustics_energy_parameters, test, ita_sum, ita_audio2struct, test, ita_channelnames_to_numbers, ita_test_all, ita_test_rsc, ita_arguments_to_cell, ita_test_isincellstr, ita_empty_header, ita_metainfo_check ita_metainfo_to_filename, ita_filename_to_header, ita_metainfo_coordinates, ita_metainfo_coordinates, ita_metainfo_coordinates, ita_roomacoustics_EDC, test_ita_class, ita_metainfo_find_frequencystring, clear_struct, ita_italian, ita_italian_init, ita_metainfo_check.
%
% Reference page in Help browser
...
...
@@ -77,10 +75,10 @@ if sArgs.blocksize > size(data.dat,2)
end
end
%% +++Body - Your Code here+++ 'result' is an audioObj and is given back
seg_window
=
hanning
(
sArgs
.
blocksize
);
result
=
data
;
resultspk
=
zeros
(
data
.
nChannels
,
sArgs
.
fftsize
/
2
+
1
);
for
idx
=
1
:
data
.
nChannels
% X(f)
thischannel
=
ita_split
(
data
,
idx
);
%Get only one channel
...
...
@@ -99,8 +97,10 @@ for idx = 1:data.nChannels
% Set channel names
if
calc_cpsd
result
.
channelNames
{
idx
}
=
[
'CPSD: '
data
.
channelNames
{
idx
}
', '
data2
.
channelNames
{
idx
}];
result
.
channelUnits
{
idx
}
=
ita_deal_units
(
data
.
channelUnits
{
idx
},
data2
.
channelUnits
{
idx
},
'*'
);
else
result
.
channelNames
{
idx
}
=
[
'PSD: '
data
.
channelNames
{
idx
}];
result
.
channelUnits
{
idx
}
=
ita_deal_units
(
data
.
channelUnits
{
idx
},
data
.
channelUnits
{
idx
},
'*'
);
end
end
...
...
@@ -110,8 +110,6 @@ result.freqData = resultspk.';
result
.
history
=
data
.
history
;
%Restore old history as we screewed it up with quite a lot calculations
result
=
ita_metainfo_add_historyline
(
result
,
'ita_psd'
,
varargin
);
%% Find output parameters
varargout
(
1
)
=
{
result
};
%end function
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment