Hi. I want creat a tranfer function have parameter,but i don't know how to do it.help me pls
Show older comments
a*s + 3
--------------
s^2 + b*s + c
Accepted Answer
More Answers (2)
Star Strider
on 6 Oct 2017
1 vote
11 Comments
super bad
on 6 Oct 2017
Star Strider
on 6 Oct 2017
Your question is ambiguous. It lacks details necessary to provide a specific solution.
Try this:
sys_fcn = @(a,b,c) tf([a 3], [1 b c]);
sys = sys_fcn(1,2,3);
bode(sys)
super bad
on 6 Oct 2017
Star Strider
on 6 Oct 2017
Try this:
a = 1;
b = 2;
c = 3;
sys = tf([a 3], [1 b c]);
bode(sys)
super bad
on 6 Oct 2017
Star Strider
on 6 Oct 2017
I did try it, it is true, and I tested all the code I posted here to be certain it works (in R2017b) before I posted it. I am out of ideas for solving your ambiguous problem.
Good luck!
Star Strider
on 6 Oct 2017
The only documentation I can find for V6.5 is for V6.5.2: LTI Models (link), probably the 2005 version. It seems that you should be able to use the last code I posted.
My last effort (before I completely give up):
sys_fcn = inline('tf([a 3],[1 b c])', 'a','b','c');
sys = sys_fcn(1,2,3);
This works in 2017b. I do not have access to V6.5, so I cannot test it with your version. MathWorks folks may have to solve your problem.
super bad
on 6 Oct 2017
Star Strider
on 6 Oct 2017
You never mentioned that as a specific requirement before.
What you want to do is not possible other than in the Symbolic Math Toolbox:
syms a b c s
sys = (a*s + 3)/(s^2 + b*s + c)
pretty(sys)
a s + 3
------------
2
s + b s + c
Stopping here.
Again, Good luck!
super bad
on 7 Oct 2017
Walter Roberson
on 7 Oct 2017
0 votes
Please post the actual question, including any requirements as to version restrictions or toolbox restrictions.
Categories
Find more on Interactive and Graphical Tuning in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!