Thanks; I was wondering whether the "whoosh" had any particular advantage. Would you mind expanding on where it might work better than a sweep?
Well, aside from avoiding a wicky sickit of conflicting patent claims,and avoiding issues around DC values, which are assured with this particular setup, and an assured very, very small condition number for direct deconvolution that does not require a system to settle to "steady state", not a lot. It's the modern take straight out of the very old Heyser methods.
https://en.wikipedia.org/wiki/Condition_number (yes, these are all at their heart matrix operations, although FFT's can help by a few orders of magnitude or 6)
It also can be used, say, for timing detection, with very short bursts (you have to massage the 2 coefficients once you sent the length) to get very, very good time resolution even in extremely noisy situations. You can make a set of these (I have done this before, but since they are somebody else's now, I'd have to make a set of coefficients) and have a set of signals of length power of 2 and just use them safely. Note that the script does not take the direct transform of the signal, it takes the transform of TWICE the length. Since an allpass sequence mathematically has to be infinite in length, these (or sweeps, etc) can not be, but they can come really, really close, without being reduced to an impulse. Measuring the response with an equal stretch of zeros after it shows any extremes that result from taking the signal out of a circular space (FFT's are circular, remember, so the last sample is next to the first in a circle in time, it's not just a stand-alone signal) and into a "one shot" use, with the resulting less-than-perfect-flatness, which can be measured and plotted just to be sure one did not stumble into some very particularly unusual situation. With a bit of optimzation, it's even possible (watch your CPU spin all night) maximize both flatness (with the 2x length with zeros attached, or even better the signal padded with 3 times zeros, before or after does not matter) and "width" of the resulting signal. In the past for fixed applications I've done that, but what is here is pretty good indeed, it's 99% of the result at .05% of the work, just check first.
In short, when you're attempting to deconvolve by it, you'll always get a good condition number, without zeros, etc. That should be true with sweeps, but it's, um, 'interesting' sometimes.
In addition, sometimes when using sweeps, especially longer ones, on real equipment, having the entire energy focused in time at one small set of frequencies can have "interesting" results (excite physical resonances for instance). With something that has less energy spread over a wide time frame, you will see the resonance, but not see potential nonlinear results. (none the less yeah, you should "fix that" when you find it,but it's cheaper that way sometimes)
FWIW, I don't think that was directed at MATLAB or Octave.
What was the intended subject? In any case, if the other poster is happy, great. If not, I was not volunteering, here, at this time and place, to give a full mathematical tutorial, and to me the design, code, and intent are, well, obvious.
I will say that getting octave (or buying the home Matlab, although I don't generally tell people to spend money) and trying these scripts, playing with them, etc, can help you discover all sorts of handy-dandy things that you can't do otherwise. So if you're curious, give it a try. If not, well, ok, you don't have to care, and that's ok.
I started to give out some very elementary tools, and somehow this turns into an argument. I have no problems with somebody using REW, what I don't understand is why someone would object to some other methods that allow pretty much total control over what you get, at, yes, a much more limited ability to graph without writing some of the code yourself. Nobody has to care in this instance.