Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

from symbolic to tf_object

Status
Not open for further replies.

thefantasticme

Automotive
Mar 22, 2006
7
hi
i have a polynomial expression: Q(s)=4*S^2+1, defined as “symbolic” but I need it as “tf-object” (defined as a transfer function) to be used in the matlab command "lsim", anyone knows how to do it?
thanks
gabi
 
Replies continue below

Recommended for you

I may be misunderstanding you're question, but here are some basics:

A transfer function is reprented by a numerator polynomial and denominator polynomial. A polynomial is a vector identifying the coefficients from highest order down to 0 order (constant)

For your example:
num = [4 0 1]
den = [1]
lsim(num,den,u,t)
(see help for u,t)

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Actually I do want to use to function lsim, and that’s why I need to transform Q(s) [i.e.: Q(s)=4*s^2+1] from "sym-object" to "tf-object".
Why do I have Q(s) as a "sym-object"? well, i had to made several previous calculus and as I a have 3 variables y need to define s as symbolic
 
Try sym2poly or coeffs to return the polynomial coefficients, then follow electricpete's help above.

xnuke
"Do you think you used enough dynamite there, Butch?"
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor