I have a Simulink model which contains an Embedded MATLAB Function block. The first inport of this block has a width greater than one (vector or matrix input).
When I linearize this model by using the Linear Analysis GUI ("Tools -> Linear Analysis"), I receive unexpected results. I receive different results if I add intermediate outports on some of the signals. I also experience frequent segmentation violations and/or crashes when linearizing the model or modifying the inports and outports used for linearization. The stack trace of the segmentation violation is as follows:
[0] m_interpreter.dll:bool __cdecl accelHotCode(struct _accelOp *,struct _accelOp * *,int *,bool *,__int64 *,bool *)(0x14cc9800, 0x00cd98cb, 0, 0x00cd987f) + 88 bytes [1] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x14ad5d48, 0x00cd9944, 1, 0) + 19097 bytes [2] m_interpreter.dll:bool __cdecl inExecuteHotSegment(struct _inJitAccelInfo *,enum opcodes *,int *)(0x00cd99d0, 0x00cd9a74, 0x00cd9a1c "µ\r", 0x12116d20 "`£Í") + 1535 bytes [3] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 3684, 257, 0) + 283 bytes [4] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 3684, 9, 0) + 272 bytes [5] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x15811200, 0, 1, 0x00cd9fd8) + 714 bytes [6] m_interpreter.dll:_inWordsj(1, 0x00cd9f78, 1, 0x00cd9fd8) + 443 bytes<SNIP>
Best Answer