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

조회 수: 1 (최근 30일)
Gurkenglas
Gurkenglas 2017년 3월 5일
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