フィルターのクリア

update the value of k in the numerator

2 ビュー (過去 30 日間)
jose luis guillan suarez
jose luis guillan suarez 2018 年 5 月 8 日
回答済み: Walter Roberson 2018 年 5 月 8 日
i want to create a transfer function with num=[k*30] and den=[1 1 6 8] and k=1. But I need to change the value of k and it is automatically updated in the num. How can i do?

回答 (2 件)

Star Strider
Star Strider 2018 年 5 月 8 日
Create an anonymous function from the tf function call:
Example
s = tf('s');
h = @(k) tf(k*30, [1 1 6 8]);
for k = 1:3
sys = h(k)
end
sys =
30
-------------------
s^3 + s^2 + 6 s + 8
Continuous-time transfer function.
sys =
60
-------------------
s^3 + s^2 + 6 s + 8
Continuous-time transfer function.
sys =
90
-------------------
s^3 + s^2 + 6 s + 8
Continuous-time transfer function.

Walter Roberson
Walter Roberson 2018 年 5 月 8 日
One way is to construct symbolic transfer functions and manage them yourself, doing the calculations with laplace() and so on.

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by