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

16 visualizaciones (últimos 30 días)
华纳公司开户微信959758504978
华纳公司开户微信959758504978 el 28 de Mzo. de 2023
Comentada: hao el 29 de Mzo. de 2023

求教,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 comentarios
hao
hao el 29 de Mzo. de 2023
are you ok?
hao
hao el 29 de Mzo. de 2023
are you ok?

Iniciar sesión para comentar.

Respuestas (1)

hao
hao el 28 de Mzo. de 2023
传递函数使用传递函数块,不要用matlab function

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by