求教,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

댓글 수: 2

hao
hao 2023년 3월 29일
are you ok?
hao
hao 2023년 3월 29일
are you ok?

댓글을 달려면 로그인하십시오.

답변 (1개)

hao
hao 2023년 3월 28일

0 개 추천

传递函数使用传递函数块,不要用matlab function

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

댓글:

hao
2023년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by