Skip to main content
16-Pearl
January 31, 2018
Question

filter() function as in MathLab?

  • January 31, 2018
  • 3 replies
  • 4333 views

Does anyone know if there is a an equivalent mcad function to the filter() function in MathLab? Don’t think there is . See picture in attached file attached

 

I am looking at the standard SRS calculation but the recursive loop is not producing what is expected.

3 replies

23-Emerald IV
January 31, 2018

You're right 'filter' does not exist in Mathcad, but it should be possible to write it as a function.

 

Success!
Luc

16-Pearl
January 31, 2018

thought so Smiley Sad

 

I had a 1st pass attempt at writing the loop for a well defined input signal but something's not right. I must have screw up the loop

 

Edit

how about

 

response(v, C1, n) Returns a n-element vector giving the response of input vector v to an FIR or IIR filter with coefficient array C1. Uses direct evaluation of the convolution. For a long input signal, this method can be quite slow.

23-Emerald IV
January 31, 2018

Does this help?

LM_20180131_filter.png

Success!
Luc

16-Pearl
January 31, 2018

thanks for the example. Looks it's me not being able to code the recursive scheme properly

21-Topaz II
January 31, 2018

Hi JXB,

you can find something about analog and digital filters in mathcad help, see the picture below and follow the arrow .

Further more you can find something else again searching in the community worksheets.

For JXB.jpg

16-Pearl
January 31, 2018

Had a look at that obviously but found it not that useful. Maybe because I don't know exactly what I am looking for !

21-Topaz II
January 31, 2018

A few years ago, I created some worksheets relating to analog filters and equivalent digital filters, which I, then, transferred to the community, you can search for them and see if you find something that interests you. They are published in both pdf and xmcd formats. The latter, however, at the opening present the bitmap images all out of place and so there is a bit of confusion, which does not happen in pdf files obviously.