请问m函数中能否构建传递函数。

求教,m函数中能够构建传递函数
function y = fcn(u)
%#codegen
num=[1 0];
den=[1 2 1];
sys=tf(num,den);
y = sys*u;
报错如下
The 'tf' class does not support code generation.
Function 'MATLAB Function' (#38.58.69), line 5, column 5:
"tf(num,den)"
Launch diagnostic report.
Component: MATLAB Function | Category: Coder error

 採用された回答

zheiman dadung
zheiman dadung 2023 年 5 月 15 日

0 投票

如果要把未知系统辨识为线性系统,有非常成熟的算法,比如自适应滤波器,对应的模块有 lms filter 等一系列;如果要按照系数建立滤波器,最普通的 Discrete Transfer Fcn 模块就支持系数的动态输入

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2023 年 5 月 15 日

回答済み:

2023 年 5 月 15 日

Community Treasure Hunt

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

Start Hunting!