Skip to content

Commit

Permalink
add some empty lines and adjust discription
Browse files Browse the repository at this point in the history
  • Loading branch information
Fiete Winter authored and hagenw committed Mar 14, 2018
1 parent c5f0af8 commit 287c848
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions SFS_general/signal_from_spectrum.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
% Build the inverse fft and assume spectrum is conjugate symmetric
outsig = real(ifft(compspec));


%% ===== Output ==========================================================
% undo reshape and permute
outsig = reshape(outsig, [samples, s(2:end)]);
Expand Down
4 changes: 3 additions & 1 deletion SFS_general/spectrum_from_signal.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Usage: [amplitude,phase,f] = spectrum_from_signal(sig,[dim],conf)
%
% Input parameters:
% signal - one channel audio (time) signal
% signal - multi channel audio (time) signal
% dim - dimension along which the fft is performed
% conf - configuration struct (see SFS_config)
%
Expand Down Expand Up @@ -105,6 +105,7 @@
amplitude = [amplitude(1,:); 2*amplitude(2:end-1,:); amplitude(end,:)] / bins;
end


%% ===== Plotting ========================================================
if nargout==0 || useplot
figure; title('Spectrum');
Expand All @@ -116,6 +117,7 @@
grid on; xlabel('frequency / Hz'); ylabel('phase / rad')
end


%% ===== Output ==========================================================
% Return values
if nargout>0
Expand Down

0 comments on commit 287c848

Please sign in to comment.