[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I have modified firls.m to include all types of FIRs plus HT and dif

From: Ozzy Lash
Subject: Re: I have modified firls.m to include all types of FIRs plus HT and diff
Date: Sat, 20 May 2017 18:56:18 -0500

On Sat, May 20, 2017 at 5:01 AM, je suis <address@hidden> wrote:
Sorry for the delay, I used some more scripts and managed to make it
with "varargin", and also seems to work. I'm surprised the way I did
it before even worked. The input vectors should not matter anymore
now, the output is a row vector.

But now I got stuck a bit at the part with the derivation. I got the
generic results of the integral shown in the block comments, in the
script, but the results are awful. Could any of you please look at it?

In short, what I think: a*Si(x) means a is the slope
(A[k+1]-A[k])/(F[k+1]-F[k]) and Si(x) is the sine integral, defined as
imag(expint(1i*x))+pi/2. This is used as a difference. Then
b*[Ci(x)-sin(x)/x] means b is the intercept, thus A[k]. Where am I

The test I used is lsfir2(11, [0 0.3 0.4 1], [0 1 0 0], 'd'). This,
according to Matlab's page, uses the default 1/f^2 weighting. I don't
know what output is supposed to be, but certainly not the one that
comes out now.


Help-octave mailing list

I can't really help much, but looking at your function, shouldn't the lines:

   q = (-pi*n'.*imag(expint(1i*n'*w(2:end)) + pi2) - ...

    q = (-pi*n'.*imag(expint(1i*n'*w) + pi2) - cos(n'*w)./F)*K'

have parens around the imag...pi2 section?  That is:

   q = (-pi*n'.*(imag(expint(1i*n'*w(2:end)) + pi2)) - ...

    q = (-pi*n'.*(imag(expint(1i*n'*w) + pi2)) - cos(n'*w)./F)*K'

since the pi/2 is part of the Si(x), I think it should be that way.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]