+ Post New Thread
Results 1 to 13 of 13
  1. #1
    Newbie level 2
    Points: 699, Level: 5

    Join Date
    Jan 2009
    Posts
    2
    Helped
    0 / 0
    Points
    699
    Level
    5

    convolution in matlab without using conv

    hi!
    i am suppose to design a low pass filter(lpf) using any window methods without uisng built-in functions in matlab. and the output should be a frequency response of the filter.

    i could find coefficients of window(simply by substituting the formula for one of the windows) but designing the lpf without using the built-in functions has been very irritating !!

    if anyone could help me concerned with this i will be very thankful!!!

    thank you!

    •   Alt28th January 2009, 01:47

      advertising

        
       

  2. #2
    Advanced Member level 4
    Points: 11,332, Level: 25

    Join Date
    Mar 2005
    Location
    USA
    Posts
    1,323
    Helped
    271 / 271
    Points
    11,332
    Level
    25

    fir filter without matlab function

    baladrg1987,
    Any good book on digital signal processing or digital filters will show the technique. Also, see:
    .
    http://ocw.mit.edu/NR/rdonlyres/070A...4D/0/lec09.pdf
    Regards,
    Kral


    1 members found this post helpful.

  3. #3
    Full Member level 5
    Points: 4,306, Level: 15

    Join Date
    Mar 2006
    Posts
    276
    Helped
    47 / 47
    Points
    4,306
    Level
    15

    matlab built filter from coeff

    This is a typical project to give you some hands-on experience with digital FIR filters. If you have some feeling with the theory, you should be able to do this :

    - Rectangular frequence response (store in an vector)
    - inverse dft on it
    - apply window

    there the filter is.

    The frequency response is the opposte :

    - take the filter coeficients
    - apply dft



  4. #4
    Newbie level 2
    Points: 699, Level: 5

    Join Date
    Jan 2009
    Posts
    2
    Helped
    0 / 0
    Points
    699
    Level
    5

    how to apply a filter in matlab

    thank you mr.kral and svhb!



  5. #5
    Member level 3
    Points: 1,839, Level: 9

    Join Date
    Jun 2008
    Posts
    52
    Helped
    4 / 4
    Points
    1,839
    Level
    9

    matlab filter function

    Quote Originally Posted by svhb
    This is a typical project to give you some hands-on experience with digital FIR filters. If you have some feeling with the theory, you should be able to do this :

    - Rectangular frequence response (store in an vector)
    - inverse dft on it
    - apply window

    there the filter is.

    The frequency response is the opposte :

    - take the filter coeficients
    - apply dft

    Please i want some help in using fdatool in matlab. I designed my filter but don't know how to apply it to my signal.

    I do export the filter as an object or to workspace or as an SOS matrix, or even as an m-file. But i can't apply this filter to my original signal.
    How can i get that.

    Or if u suggest any other method for me to design a BPF and apply it to my signal.
    I've really got confused.
    Thanks in advance.



  6. #6
    Full Member level 5
    Points: 4,306, Level: 15

    Join Date
    Mar 2006
    Posts
    276
    Helped
    47 / 47
    Points
    4,306
    Level
    15

    dft filter in matlab

    For a FIR-filter : if you have your filter coeficients, you use concolution to apply it to your signal. (this is basically how the filter works).

    Code:
    w = conv(u,v) convolves vectors u and v. Algebraically, convolution is the same operation as multiplying the polynomials whose coefficients are the elements of u and v.



    •   Alt30th January 2009, 20:14

      advertising

        
       

  7. #7
    Member level 3
    Points: 1,839, Level: 9

    Join Date
    Jun 2008
    Posts
    52
    Helped
    4 / 4
    Points
    1,839
    Level
    9

    matlab programs of dft without builtin function

    Quote Originally Posted by svhb
    For a FIR-filter : if you have your filter coeficients, you use concolution to apply it to your signal. (this is basically how the filter works).

    Code:
    w = conv(u,v) convolves vectors u and v. Algebraically, convolution is the same operation as multiplying the polynomials whose coefficients are the elements of u and v.
    Now, I've exported my BPF's coefficients in the workspace of matlab as num, den.
    so, which function should i use to apply the filter to my signal.
    I've used the function
    filter(num,den,x) %%% where x=my data signal
    but i have no result.
    The code that u've written of using conv(u,v)
    I think it can't work coz my coefficients r 2 vectors, num & den
    and i want to apply it on my signal x
    but, the conv function have just 2 arguments.

    Is there any other function that works for my num & den coefficients.
    Please... help
    And, sorry for interruption.



  8. #8
    Full Member level 5
    Points: 4,306, Level: 15

    Join Date
    Mar 2006
    Posts
    276
    Helped
    47 / 47
    Points
    4,306
    Level
    15

    matlab built in functions code

    Num and den are the coeficients for the polynomials defining A and B in
    H(Z) = B(Z)/A(Z)

    When the coeficients of A are zero, except the first one, you made a FIR filter, and just divide all coeficient from B with a0. This is the impulse respone of the filter, and is finite (Finite Impluse Response filter). You can use these coeficients to do a convolution with your input signal.

    When there are other coeficients than the first one of A are nonzero, you made an IIR filter (Infinite Impulse response filter). You can find the impulse respone by dividing the polynomials A and B, and you will see it never ends (but the results become smalleer and smaller, I hope). Because the impulse response never ends, it's inpractical to do with convolution.

    If you look at how a digital filter works, it will be not to difficult to apply the filter to any input signal.



  9. #9
    Junior Member level 1
    Points: 1,364, Level: 8

    Join Date
    Feb 2006
    Posts
    16
    Helped
    0 / 0
    Points
    1,364
    Level
    8

    calculate the inverse of a fir filter in matlab

    Quote Originally Posted by svhb
    This is a typical project to give you some hands-on experience with digital FIR filters. If you have some feeling with the theory, you should be able to do this :

    - Rectangular frequence response (store in an vector)
    - inverse dft on it
    - apply window

    there the filter is.

    The frequency response is the opposte :

    - take the filter coeficients
    - apply dft
    For your information, for the response of filter, I do respectly a bit disagree with you while by using inverse DFT instead of DTFT, for the former is disceret frequency response while the latter is the correct continuous period discrete time fourier transform.



  10. #10
    Full Member level 5
    Points: 4,306, Level: 15

    Join Date
    Mar 2006
    Posts
    276
    Helped
    47 / 47
    Points
    4,306
    Level
    15

    matlab code without inbuilt functions

    indeed it needs to be the discrete version of the transform, with DFT, I mean Discrete Fourrier Transform.



  11. #11
    Advanced Member level 4
    Points: 19,911, Level: 34
    Aya2002's Avatar
    Join Date
    Dec 2006
    Location
    Malaysia
    Posts
    1,143
    Helped
    393 / 393
    Points
    19,911
    Level
    34

    using a filter as window matlab

    thanks to svhb



  12. #12
    Advanced Member level 1
    Points: 4,634, Level: 16
    xulfee's Avatar
    Join Date
    May 2008
    Location
    Pakistan
    Posts
    403
    Helped
    51 / 51
    Points
    4,634
    Level
    16

    convolution matlab without using conv

    get ur transfer function from coefficent of filters by using tf(z,p) then multiply it wuth ur input



  13. #13
    Advanced Member level 4
    Points: 19,911, Level: 34
    Aya2002's Avatar
    Join Date
    Dec 2006
    Location
    Malaysia
    Posts
    1,143
    Helped
    393 / 393
    Points
    19,911
    Level
    34

    filters without using matlab function

    see this file will help you too much



+ Post New Thread
Please login