pass a system object to a function for codegen

7 visualizaciones (últimos 30 días)
Mojtaba
Mojtaba el 22 de Mzo. de 2013
Hi,
I designed a system by using system object in MATLAB. Now I want to generate c codes for a function that uses this system object as input. The function is as follows:
function y = usingSysObj(sysobj, x) %#codegen
y = sysobj.step(x);
end
in which sysobj is a system object.
when I try to generate code for the function by codegen command I receive an error:
Class Sysobj is not supported by coder.Type.
I would be grateful if someone could help with this problem.

Respuestas (1)

Kaustubha Govind
Kaustubha Govind el 22 de Mzo. de 2013
AFAIK, it is not possible to pass in a System object as an argument to a function that you'd like to generate code from. The System object needs to be created inside of the function.

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by