MATLAB Answers


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

Asked by vinicius lanziotti on 14 Jun 2019
Latest activity Commented on by Joss Knight
on 6 Jul 2019
What's the command for I see the code of this function?


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.


1 Answer

Answer by James Tursa
on 14 Jun 2019
Edited by 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

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.