[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: Nicholas Jankowski
Subject: Re: I have modified firls.m to include all types of FIRs plus HT and diff
Date: Thu, 18 May 2017 07:23:40 -0400

On May 17, 2017 12:18 PM, "je suis" <address@hidden> wrote:
I modified the script and I could use some testing. The examples
enumerated in there (without the oddities) should cover it, I think.
If you see something out of place, please let me know. Do note,
however, that using default weights for differentiator will not be a
match (I still don't know how to make the 1/f^2 weighting, I'll ask

Also, I tried to input vertical vectors, but somewhere along the way I
need to multiply with a range. I don't know how to make that vertical
or horizontal to match the input. Any help in this matter is

If I understood your previous email correctly, and the issue you mention here it sounds like you need to do some input checking and preconditioning before processing. I'll try to take a look at your code later today, but for the case of the third input either being a vector or a string you would want to have octave check the class of the input for that variable prior to doing any computation. Since there is a variable number of possible inputs, you will want to use 'varargin' to collect them and then do type checking to decide what to do with them and how to run the code. Again, the quadgk function is a good example of this as it has to deal with both a variable number of possible inputs and mixed numerical and string inputs. There is also now a supported inputParser class that supposedly is a more elegant way to do this, but I'm not familiar with it so I just do it the old-fashioned way.

Then for any vectors, if they don't come in the orientation you want, you can have octave change them to either a row or column inside the function as you desire. I find the fastest way to do this is either

A = A(:)

for column output or

A = A(:)'

for row output

reply via email to

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