Path: news.mathworks.com!not-for-mail
From: "Brett " <brett.leonard@mcgill.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: infreqz
Date: Wed, 10 Feb 2010 00:56:05 +0000 (UTC)
Organization: McGill University
Lines: 9
Message-ID: <hkt075$476$1@fred.mathworks.com>
References: <hkqhgv$f5a$1@fred.mathworks.com> <hkrlg7$col$1@fred.mathworks.com> <hkrmjs$nlu$1@fred.mathworks.com> <hkro1d$ocb$1@fred.mathworks.com>
Reply-To: "Brett " <brett.leonard@mcgill.ca>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1265763365 4326 172.30.248.35 (10 Feb 2010 00:56:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 10 Feb 2010 00:56:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2171222
Xref: news.mathworks.com comp.soft-sys.matlab:605962


> Yes, if you have a nonstationary signal that would require some kind of analysis like the STFT, I don't see how you can generate one filter for that process. invfreqz() is returning a filter with a rational Z-transform indicative of a linear time-invariant system. 
> 
> Wayne

OK, that makes total sense.  I was, in my haste, neglecting spectrogram's default 8 time segments.  Now I've re-worked my code with a simple fft for a single block of time, generating a filter for that time period.  And eureka, it seems to work quite nicely!

Looking at the frequency response of the filter created, it's bang on!  I'm still having an issue, though.  I apply the filter with the coefficients from invfreqz (which I viewed the output of using freqz, with the above stated success) to a vector of white noise.  I expect to see the same spectral response out as the filter, with the length of the input vector size.  What I get, instead, is a string of zeros followed by a sharp cutoff about a third of the way through the vector.  I can't even describe what I'm seeing, really; rather than filtering the signal (in the frequency domain) it just seems to have multiplied by zero and truncated it.

I'm starting to wonder of I'm barking up the wrong tree with invfreqz; all I'm trying to do is impose the frequency response of an input signal (an impulse response, in fact) onto a noise signal with a flat spectrum.  And here I was thinking this was going to be easy...