Simulating C MEX S-Function causes crash (Level 2)

I need a small help in S-Function development.
I am trying to write an S-Function, which takes an input , which is a matrix of [5][400].
The inputs will be updated for every cycle.
I am able to generate .mexw32 file, but MATLAB is crashing while running the same using S-Function block in Simulink.
I feel, there are some bugs in my S-Function Program .
Can someone help me in analyzing that.
I will share you my S-Function, that i wrote.

Antworten (1)

Titus Edelhofer
Titus Edelhofer am 29 Mai 2015

0 Stimmen

Hi,
the documentation describes how to debug mex files. One thing that is definitely missing is to declare direct feedthrough for the input port (use ssSetInputPortDirectFeedThrough for the input port).
Titus

Kategorien

Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 29 Mai 2015

Beantwortet:

am 29 Mai 2015

Community Treasure Hunt

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

Start Hunting!

Translated by