Need to get matlab to display the continuous time transfer function

2 visualizaciones (últimos 30 días)
clc;
% (b)
% state variable model
A = [1 3 0; -3 0 7; -5 -4 -8];
B = [-1; 0; 1];
C = [1 0 0];
D = 0;
% get numerator & denominator of transfer function using ss2tf
[num, den] = ss2tf(A,B,C,D);
% converting numerator & denominator to transfer function
system = tf(num,den)
system = -s^2 - 8 s - 7 ------------------------ s^3 + 7 s^2 + 29 s + 149 Continuous-time transfer function.
That is my code. Everything works [as] I get the right numerator and denominator.
The problem is the comman window won't display the transfer function and yes, I have the [Control System Toolbox] installed.

Respuesta aceptada

Les Beckham
Les Beckham el 12 de Sept. de 2024
Editada: Les Beckham el 12 de Sept. de 2024
Please explain exactly what the problem is. You need the Control System toolbox, not the "command tool box", whatever that is.
A = [1 3 0; -3 0 7; -5 -4 -8];
B = [-1; 0; 1];
C = [1 0 0];
D = 0;
%get numerator & denominator of transfer function using ss2tf
[num, den] = ss2tf(A,B,C,D);
%converting numerator & denominator to transfer function
system = tf(num,den);
display(system)
system = -s^2 - 8 s - 7 ------------------------ s^3 + 7 s^2 + 29 s + 149 Continuous-time transfer function.
which display(system)
/MATLAB/toolbox/control/ctrlmodels/@tf/display.m % tf method
  2 comentarios
Michael Zagar
Michael Zagar el 12 de Sept. de 2024
that worked I overlooked such a simple thing thank you very much
Les Beckham
Les Beckham el 12 de Sept. de 2024
You are quite welcome. Please Accept the answer if it helped you.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by