What is the best way to deal with the filter coefficients?

 

I have this question. I am completing an article on filters, the question of coefficients came up. Briefly - all parameters and even the type of filter, LPF, VSF, bandpass, etc. depend on them.

I calculate them for myself in Matlab. I don't want to calculate them in MQL5, as I will be able to handle only the windowed method and the filters will be long. Besides, it will take my time for nothing.

I decided not to make a voting especially for pioneers not to make it in vain. There are following variants, which one would be more convenient for you?

  1. Sets of coefficients calculated in Matlab and laid out in text or binary form for standard configurations, one variant per file.
  2. All variants are merged into one binary file, a class is provided for access. (this has already been done for itself)
  3. A Matlab program is provided to calculate in .m source code. It is very simple, but you need Matlab, you can download it from the official website, trial for a month.
  4. If you have Matlab, I make an instruction, how to quickly calculate coefficients. Maybe a video.
  5. I download Matlab runtime, it is free, but it weighs about a gig in the distribution. I can write a program for it with gui, like in Matlab itself, see Fig. 1 for example.
  6. I don't know how to calculate in R. I looked in R, there are a lot of libraries for calculating filters, the quality is absolutely unknown. In Matlab, at least I'm sure it will be an optimal length filter with specified parameters, and not a handiwork of some unknown pioneer.

dd

Figure 1 Filter Builder window in Matlab

MATLAB Runtime - MATLAB Compiler - MATLAB
  • www.mathworks.com
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: . Select
 
Alexey Volchanskiy:

I have this question. I am completing an article on filters, the question of coefficients came up. In a nutshell - all parameters and even filter type, LPF, VSF, bandpass, etc., depend on them.

Well, since all are silent and discuss whether to hide the names, I'll post my variant N2.
 
Alexey Volchanskiy:
Well, since everyone is silent and discussing whether to hide the names, I'll post my variant N2.

FHF, FHF, FHF? What do you think you are doing in decent society? At least you didn't mention tracking and parametric filters.

Some years ago I wrote a short post on one of the market forums about tracking filters (like a blog). I no longer want to talk about any filters at all).

 
Yuriy Asaulenko:

FHF, FHF, FHF? What do you think you are doing in decent society? At least you didn't mention tracking and parametric filters.

Some years ago I wrote a short post on one of the market forums about tracking filters (like a blog). I no longer want to talk about any filters at all).

Got your feet kicked in ?
 

Alexei, I'm afraid that filters and MathLab are too complicated for the vast majority of participants.

That's why people aren't talking.

In my opinion, a class for access is the best. It doesn't take long to figure it out, and the result can be evaluated.

 
There is an unhealthy tendency lately to run away from mql, now it's R, now it's matlab :) Well, the author is a king, so the second is the second, we will eat them anyway, no options, all new things are interesting :) I'm not a bread-and-butter man, let me read articles, they should come out more often
 
George Merts:

Alexei, I'm afraid that filters and MathLab are too complicated for the vast majority of participants.

That's why people aren't talking.

In my opinion, a class for access is the best. It doesn't take long to figure it out, and the result can be evaluated.

People are keeping silent not because it's complicated, but because no one uses Matlab. People here use MQL, however weird it may seem to some people.
 
Maxim Dmitrievsky:
There is an unhealthy tendency lately to run away from mql, now it's R, now it's matlab :) Well, the author is a king, so the second so the second, we will eat them anyway, no options, all new things are interesting :) I'm not a bread-and-butter, just let me read the articles, so they would come out more often.
The tendency is not to flee from MQL, but the tendency to walk around monasteries with a samovar. These are different things.
 
Andrey Dik:
The tendency is not to run away from MQL, but the tendency to walk around monasteries with your samovar. These are different things.

First of all, everything is done in MQL5 in the form of classes, simple examples in procedural style. There's no need to go to Matlab. But I clearly wrote, I can't calculate filters with minimal length and maximal approximation to parameters. At least it's not a task within one article.

For example, my last project at work was universal audio remapper, i.e. program which changes sample rate, e.g. from 44100 Hz for CD to 22050 for lower bitrate. There's extensive use of filters there. And my boss was snapping, like we're cool, we should make our own program to calculate coefficients to give them to our clients. And I insisted on option 5, to use Matlab's free rantime. It would be fast, tasty and free.

He gave me a cool mathematician in the group, and we fought and fought, but Matlab was still better. I then resigned, I don't know whether the boss got his reasons or his pride remained the winner.

So don't worry, no matlab, just made pictures on it.

 

A digital method generator?

In general, I'm all for a window sink filter.

Универсальный цифровой фильтр
Универсальный цифровой фильтр
  • votes: 13
  • 2011.08.05
  • Nikolay Kositsin
  • www.mql5.com
Этот индикатор представляет собой общее решение задачи по использованию цифровых фильтров в клиентском терминале.
 
Alexey Volchanskiy:

So don't worry, no matlab, just pictures made on it.


OK, that's our way!
Reason: