MATLAB Answers

How can I see the filter function implementation code at MATLAB?

23 views (last 30 days)
vinicius lanziotti
vinicius lanziotti on 14 Jun 2019
Commented: Joss Knight on 6 Jul 2019
What's the command for I see the code of this function?


John D'Errico
John D'Errico on 14 Jun 2019
Getting a job at The MathWorks is usually the suggested way to see code that is not provided as an m-file. It is also essentially the only way.

Sign in to comment.

Answers (1)

James Tursa
James Tursa on 14 Jun 2019
Edited: James Tursa on 14 Jun 2019
In general, if the function has an associated .m file then TMW is willing to show you that much. Also there may be information in the doc on the implementation details. Other than that, implementation details are proprietary.
In your specific case, the filter( ) function is built-in, so the only implementation details TMW is willing to share with you are in the filter.m file comments and in the doc.

  1 Comment

Walter Roberson
Walter Roberson on 14 Jun 2019
Many different filter() routines; some of them are built-in. The user has been asking about Type I filters, which are handled by dfilt.df1, and dfilt is a class for which some source is provided.
>> which -all filter
built-in (/Applications/
filter is a Java method % java.util.Locale method
filter is a built-in method % connector.internal.LoggerLevel method
filter is a built-in method % matlab.lang.OnOffSwitchState method
/Applications/ % dfilt.df1 method
/Applications/ % dfilt.abstractfilter method
/Applications/ % tall method
/Applications/ % SigLogSelector method
/Applications/ % channel method
/Applications/ % gpuArray method
/Applications/ % arima method
/Applications/ % dssm method
/Applications/ % egarch method
/Applications/ % garch method
/Applications/ % gjr method
/Applications/ % LagOp method
/Applications/ % regARIMA method
/Applications/ % ssm method
/Applications/ % statespace method
/Applications/ % varm method
/Applications/ % vecm method
/Applications/ % fints method
/Applications/ % fxptui method
/Applications/ % timeseries method

Sign in to comment.



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!