tf command not working correctly
Mostrar comentarios más antiguos
Hello,
I am not sure why this is happening. I ran this command in MATLAB
sys=tf([4],[1 2 0])
and got this as the answer.
sys =
s^20 + 1.5 s^19 + 2 s^18 + 2.5 s^17 + 3 s^16 + 3.5 s^15
+ 4 s^14 + 4.5 s^13 + 5 s^12 + 5.5 s^11 + 6 s^10
+ 5.5 s^9 + 5 s^8 + 4.5 s^7 + 4 s^6 + 3.5 s^5
+ 3 s^4 + 2.5 s^3 + 2 s^2 + 1.5 s + 1
--------------------------------------------------------------
s^20 + 1.5 s^19 + 2 s^18 + 2.5 s^17 + 3 s^16 + 3.5 s^15
+ 4 s^14 + 4.5 s^13 + 5 s^12 + 5.5 s^11 + 6 s^10
+ 5.5 s^9 + 5 s^8 + 4.5 s^7 + 4 s^6 + 3.5 s^5
+ 3 s^4 + 2.5 s^3 + 2 s^2 + 1.5 s + 1
This is not the correct answer to the transfer function.
Do you know what I can do to fix this?
Thank you
4 comentarios
Adam Danz
el 31 de Mzo. de 2020
I get the expected output. Are you sure your code doesn't have a typo in the inputs?
sys=tf([4],[1 2 0])
sys =
4
---------
s^2 + 2 s
Continuous-time transfer function.
% list tf() fuctions & methods on path
>> which tf -all
C:\Program Files\MATLAB\R2019b\toolbox\control\ctrlmodels\@tf\tf.m % tf constructor
C:\Program Files\MATLAB\R2019b\toolbox\control\ctrlmodels\@DynamicSystem\tf.m % DynamicSystem method
C:\Program Files\MATLAB\R2019b\toolbox\shared\controllib\engine\+ltipack\@tfdata\tf.m % ltipack.tfdata method
C:\Program Files\MATLAB\R2019b\toolbox\ident\ident\@idParametric\tf.m % idParametric method
C:\Program Files\MATLAB\R2019b\toolbox\mpc\mpc\@mpc\tf.m % mpc method
C:\Program Files\MATLAB\R2019b\toolbox\shared\controllib\engine\@StaticModel\tf.m % StaticModel method
Grace Normoyle
el 31 de Mzo. de 2020
Grace Normoyle
el 31 de Mzo. de 2020
Adam Danz
el 1 de Abr. de 2020
See this thread. There are two different answers. Try the accepted answer first. If that doesn't work, try the 2nd answer. If neither work, contact MathWorks support.
Respuestas (0)
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!