matlab6.5下创建的模型mdl,在matlab7.0中仿真正常。但在cbc6调用matlab(7.0)引擎
仿真时出错。求高手帮忙解答
另:一些matlab中的字符串处理函数:lower,upper在引擎中运行也得不到正确结果;

    该模型在cbc6调用matlab6.5引擎时一切正常。

出错信息如下:
------------------------------------------------------------------------
       Segmentation violation detected at Wed Oct 21 10:08:08 2009
------------------------------------------------------------------------

Configuration:
  MATLAB Version:   7.0.0.19920 (R14)
  Operating System: Microsoft Windows XP
  Window System:    Version 5.1 (Build 2600: Service Pack 2)
  Processor ID:     x86 Family 15 Model 15 Stepping 2, AuthenticAMD
  Virtual Machine:  Java 1.4.2 with Sun Microsystems Inc. Java HotSpot(TM) Cli
ent VM
    (mixed mode)
  Default Charset:  US-ASCII

Register State:
  EAX = 00000001  EBX = 01683eb0
  ECX = 00000001  EDX = 00000000
  ESI = 1b345b10  EDI = 7a36e36c
  EBP = 00cddcfc  ESP = 00cddcf8
  EIP = 787920cc  FLG = 00010202

Stack Trace:
  [0] libmx.dll:_mxGetField(0x1b345b10, 0, 0x7a36dc8c, 0x00cddd18) + 60 bytes

  [1] simulink.dll:_GetRTWVersion(0x1b31ba14, 0x1b1d2030, 0x01683eb0, 0x1a83a3
30) + 221 bytes
  [2] simulink.dll:void __cdecl AddBdInfoToMdlStructuralChecksum(struct slBloc
kDiagram_tag *,struct slChecksumRec_tag *,struct slBlock_tag * *,int)(0x01683e
b0, 0x1b2de6f0, 47, 0) + 1285 bytes
  [3] simulink.dll:struct slErrMsg_tag * __cdecl BdComputeChecksums(struct slB
lockDiagram_tag *,struct slBlock_tag * *,int)(0, 0x1b2de6f0, 47, 0x00cde418) +
 714 bytes
  [4] simulink.dll:struct slErrMsg_tag * __cdecl sleCompileBlockDiagram(struct
 slBlockDiagram_tag *,bool,enum SimType,struct mxArray_tag *)(0x1aa9b788, 0, 0
, 0) + 4196 bytes
  [5] simulink.dll:struct slErrMsg_tag * __cdecl GetBlockDiagramModelType(stru
ct slModel_tag *,struct sleInitModelContext *,bool)(0x00cde418, 0, 0x1b1feac0,
 0x1b18a420) + 1273 bytes
  [6] simulink.dll:struct slErrMsg_tag * __cdecl sleInitModel(struct slModel_t
ag *,struct sleInitModelContext,bool)(0x1b18a420, 0, 0, 0) + 43 bytes
  [7] simulink.dll:struct slErrMsg_tag * __cdecl Simulate(struct slModel_tag *
,struct CmdlInfo *,int,int,struct mxArray_tag * * const)(0, 0x1a26a480, 0xffff
ffff, 0) + 49 bytes
  [8] simulink.dll:void __cdecl sleCommandLineSimulation(int,struct mxArray_ta
g * * const,int,struct mxArray_tag * * const,bool,bool)(0, 0x00cde71c, 1, 0x00
cde77c) + 115 bytes
  [9] simulink.dll:void __cdecl slFullSimulate(int,struct mxArray_tag * * cons
t,int,struct mxArray_tag * * const)(0, 0x00cde71c, 1, 0x00cde77c) + 28 bytes

  [10] m_dispatcher.dll:public: virtual void __thiscall Mfh_builtin<struct mxA
rray_tag>::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(
0, 0x00cde71c, 1, 0x00cde77c) + 55 bytes
  [11] m_dispatcher.dll:public: virtual void __thiscall Mfh_MATLAB_fn::dispatc
h_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 1, 
0x00cde77c) + 200 bytes
  [12] m_interpreter.dll:_inDispatchFromStack(422, 0x013fb120, 0, 1) + 891 byt
es
  [13] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,
int,int,int *,int *)(0x013fb120, 422, 0, 1) + 111 bytes
  [14] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum o
pcodes,struct inPcodeNest_tag volatile *)(2, 0, 0, 0) + 2411 bytes
  [15] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,
enum opcodes,struct inPcodeNest_tag *)(2, 0, 0, 0) + 272 bytes
  [16] m_interpreter.dll:_inInterPcode(2, 0x7876f2d8, 0, 0) + 69 bytes
  [17] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_fun
ction(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDe
bugCheck)(0x00cdf2c8, 0x00cdf3bc, 2, 0x1a5cbbe0) + 162 bytes
  [18] m_interpreter.dll:$L72592(0x7876f2d8, 0x1a5cbbe0, 25, 0) + 196 bytes
  [19] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalRetu
rnandtype(char const *,int *,enum inDebugCheck)(0, 2, 1, 0x00cdf44c) + 86 byte
s
  [20] m_interpreter.dll:_inEvalCmdNoEnd(0x1a5cbbe0, 0x00cdf4e4, 0x00cdf4a0, 0
x013e0a50) + 16 bytes
  [21] bridge.dll:_mnParser(0x7c80b6a1, 0x013e0a50, 0, 0) + 431 bytes
  [22] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271240, 0x6
d5c3a64, 0x616c7461, 0x625c3762) + 87 bytes
  [23] matlab.exe:0x00401d2f(4194304, 0, 271240, 0x013e0a50)
  [24] matlab.exe:0x00403e45(656160, 0x007af0e0, 0x7ffd3000, 0x8086d9fd)
  [25] kernel32.dll:0x7c816fd7(0x00403cc0, 0, 0, 0)

Please follow these steps in reporting this problem to The MathWorks so
that we have the best chance of correcting it:

  1. Send this crash report to segv@mathworks.com for automated analysis.
     For your convenience, this information has been recorded in:
       C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\matlab_crash_dump.2712

  2. Also, if the problem is reproducible, send the crash report to
     support@mathworks.com along with:
       - A specific list of steps that will reproduce the problem
       - Any M, MEX, MDL or other files required to reproduce the problem
       - Any error messages displayed to the command window
     A technical support engineer will contact you with further information.


Thank you for your assistance.  Please save your workspace and restart
MATLAB before continuing your work.