How to output symbolic functions?

조회 수: 2 (최근 30일)
Robert  Flores
Robert Flores 2018년 9월 25일
답변: Walter Roberson 2018년 9월 25일
Hello everyone,
I am trying to make a function (Gs) in my code, and have the out put Gs with an arbitrary constant K. The code works if I assign K a value, such as 5. However, I would just like it to output the Gs function displaying the constant K. If you can help it will be most appreciated, thanks.
Note: I have attached my code below.
CODE:
clc, clear, close all
K = 5
num = [25];
den = [1 K 25];
Gs = tf(num,den)
-Robert

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 25일
tf() cannot support that at this time, and probably never will.
There are some alternatives, but also some limitations. See the more detailed discussion at https://www.mathworks.com/matlabcentral/answers/305339-how-to-create-a-transfer-function-with-gain-k#answer_236890

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by