How to output bus-arrays / arrays of structures in c-mex s-functions?

1 次查看(过去 30 天)
Hi,
I am trying to output an array of structures via bus-objects ("a" in the following example) from my handwritten c-mex s-function. But whatever I try, my s-function just outputs the frist structure/bus-object ("a(1).b" and "a(1).c"). To clarify, here is the structure (from workspace), that I want to get from my s-function bus output:
a(1).b = 1;
a(1).c = 2;
a(2).b = 3;
a(2).c = 4;
bus1 = Simulink.Bus.createObject(a);
I dont find any examples in the documentaion or elsewhere. Do you have any suggestions or code examples, how to implement this in a c-mex s-function?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by