help-octave
[Top][All Lists]
Advanced

[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: Fri, 2 Jun 2017 14:31:40 -0500



On Thu, Jun 1, 2017 at 1:10 AM, je suis <address@hidden> wrote:
> I hope this doesn't go to spam. [...]

I'm sorry, I forgot to add this: the results are also awfully
influenced by the F(1)=0 workaround. Currently, I use 1e-6, but 1e-5
and above, or 1e-7 and below give different results, which makes me
think they must use a similar approach, but also that the results may
be finicky.

Vlad

Regarding the F(1)=0 issue, can you work around this by supplying a non-zero F(1) while trying to match the matlab calculation?

Depending on how it is implemented in matlab, you may be able to do something like the following (probably needs some grooming):

orig = firls(6,[0 0.1], [1 0], 'd');
for xp = -9:-4
for mant=1:9
f0=mant * 10^xp;
if all((orig - firls(6, [f0 0.1], [1 0], "d")) < 2*eps)
f0
printf("is treated the same as 0\n");
end
end
end


So basically seeing if any values of F(1) in the range from 1e-9 to 9e-4 are treated the same as a 0 argument.  If matlab replaces values less than a specified amount by x, then you should see a range of values where the values are the same.  If it only replaces 0, you may only get one match (or even no matches if the value isn't tested).

I don't have access to matlab, so can't check this.

Bill

reply via email to

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