No BSD License  

Highlights from
exp.sweep and impulse response

Be the first to rate this file! 19 Downloads (last 30 days) File Size: 1.4 KB File ID: #19566

exp.sweep and impulse response

by Matthes

 

12 Apr 2008 (Updated 14 Apr 2008)

generate exp. sine sweep and calculate impulse response and distortion

| Watch this File

File Information
Description

[sweep,invsweep]=expsweep(T,f1,f2,silence,fs)
generate sine sweep with exponential frequency dependent energy decay
over time and time/frequency inverse for impulse response calculation
inputs:
T = sweep duration in seconds
f1 = start frequency in Hz
f2 = end frequency in Hz
silence = silence before and after sweep in seconds (default: 0)
fs = sampling frequency (default: 44100)

[h,h_dist]=sweepIR(rec,Nimp,T,f1,f2,offset,fs)
calculate impulse response and distortion from exponential sweep recording
inputs:
rec = mono sweep recording
T = sweep duration in seconds
f1 = start frequency in Hz
f2 = end frequency in Hz
offset = offset length before impulse response in samples
outputs:
h = impulse response
h_dist = impulse responses of the first 6 nonlinear distortion harmonics

Required Products Signal Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
29 Jun 2009 Ward verhelst

please add a practiacl example: generation of data&processing of data

18 Oct 2010 Xourlingkahn

Function "expsweep" works fine, it does what it is intended to do.
On the other hand function "sweepIR" does give an error in line 36: rec=rec(t:end,:); I changed it by rec = rec(1:length(t), :); but I cannot get it to work.
Another thing, use of word "offset" is a reserved word for MATLAB so I had to change it by something else.
Finally, variable Nimp is not documented as to what it is!
Please provide a corrected version of the function and it should work fine.
Thanks!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
example Matthes 22 Oct 2008 09:57:39
application Matthes 22 Oct 2008 09:57:39
sweep impulse response distortion Matthes 22 Oct 2008 09:57:39
example Vukasin Spasic 25 Jul 2010 14:30:46
sweep impulse response distortion Xourlingkahn 18 Oct 2010 06:37:39
example Xourlingkahn 18 Oct 2010 06:37:45

Contact us at files@mathworks.com