Site Network: Home | Blogcrowds | Gecko and Fly | Free Online Libraries | Free Antivirus | Free CAD Software | Free Software | Telegraph TV | About

Advertisement

Your Ad Here

UTeM BMFR Google Search Engine

Custom Search

Transfer Function - Part 3

HOW TO INPUT THE TRANSFER FUNCTION INTO MATLAB

In order to enter a transfer function into MATLAB, the variables much be given numerical value, because MATLAB cannot manipulate symbolic variables without the symbolic toolbox. Enter the numerator and denominator polynomial coefficients separately as vectors of coefficients of the individual polynomials in descending order. The syntax for defining a transfer function in MATLAB is:

transferfunction = tf(num, den)

where num is defined as the vector of numerator coefficients, and den is defined as the vector of denominator coefficients.

EXAMPLE

Input the transfer function X(s)/F(s) = 1/[ms2 + bs + k] into MATLAB:

For illustration purposes, this example uses m = 2, b = 5, and k = 3.

>> m = 2;
>> b = 5;
>> k = 3;
>> num = [ 1 ];
>> den = [ m b k ];
>> tutorial_tf = tf(num, den)

MATLAB will assign the transfer function under the name tutorial_tf, and output the following:

Transfer function:
1
---------------
2 s^2 + 5 s + 3

0 Comments:

Post a Comment



UTeM BMFR Blog Directories

UTeM BMFR MyBlogLog