help-octave
[Top][All Lists]

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

 From: Nicholas Jankowski Subject: Re: I have modified firls.m to include all types of FIRs plus HT and diff Date: Sun, 25 Jun 2017 19:26:05 -0400

Just to close the loop for the archive, a bug report has been submitted to
https://savannah.gnu.org/bugs/?51310

On Jun 2, 2017 3:31 PM, "Ozzy Lash" <address@hidden> wrote:

On Thu, Jun 1, 2017 at 1:10 AM, je suis 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.

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