Is there a way to return variable names instead of values when constructing TF?
6 次查看(过去 30 天)
显示 更早的评论
Is there a way of getting MATLAB to return variable names instead of values when computing? As an example if I were to run:
J = 0.0000889754 ;
b = 0.00001 ;
Ke = 0.0366 ;
Kt = 0.54233 ;
R = 1.47 ;
L = 0.0082 ;
l = 0.02 ;
TFM = tf([ Kt ] , [ (J*L) , (J*R+L*b) , (R*b + Ke*Kt) ])
Is there a way of having the result display as:
Kt
JLs^2 + (JR+Lb)s + (Rb+KeKt)
as opposed to:
0.5423
7.296e-7 s^2 + 0.0001309s + 0.01986
I'm trying to simplify down a controller, but don't have actual values for it yet and the simplification is taking about an A4 page per coefficient per function so it'd be a lot more confident about the calculation if I wasn't involved to inevitably make a mistake somewhere down the line.
0 个评论
回答(1 个)
Prajit T R
2018-4-10
Hi Alex
Unfortunately the only certain variables permitted to print out as transfer function. If you try to give other names in the 'Variable' property, you will get the following error message:
The "Variable" property must be set to 's' or 'p' for continuous-time systems, and to one of the following: 'z', 'q', 'z^-1', or 'q^-1' for discrete-time systems.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!