Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab Transfer Function

  1. Oct 24, 2013 #1

    I need to do bode plot..

    but i not to sure how to use matlab..

    i need this 1 / (a + bs)s

    num = 1
    how to key in the den to get (a + bs)s..

    i try different way and i can't get 1/(a+bs)s

    hope to get help
  2. jcsd
  3. Oct 25, 2013 #2
    You can define vectors in descending powers of s, for both the numerator and the denomator:
    ie, for s^3+5s+1, you would use :
    den=[1 0 5 1], where the vector is made up of the coefficients of the polynomial in s.

    Then, you use function tf to create the transfer function from the numerator and denominator created as described above. Then, you can invoke the bode function in Matlab to obtain the bode plot.

    I don't remember if bode is part of the standard Matlab distribution or if it is part of a tool box....
    In case it is not, you can do it yourself by substituting jw for s, and solving the complex math for the numerator and denominator and then taking the 20log of the numerator - 20log of the denominator for the different values of w.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook