Effacer les filtres
Effacer les filtres

Is there a way to return variable names instead of values when constructing TF?

5 vues (au cours des 30 derniers jours)
Alex Smith
Alex Smith le 7 Avr 2018
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.

Réponses (1)

Prajit T R
Prajit T R le 10 Avr 2018
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.

Catégories

En savoir plus sur Software Development Tools dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by