Matlab - Mex-Functions
Répondre à la discussion
Affichage des résultats 1 à 2 sur 2

Matlab - Mex-Functions



  1. #1
    invite041307ce

    Matlab - Mex-Functions


    ------

    Nouveau problème.

    Mon fichier C compile bien, mais lors de l'appel de la fonction dans mon programme Matlab, ça ne marche pas du tout.
    J'ai mis ce qu'il m'écrit ci-après.
    J'utilise dans mon programme C des fonctions qui ne sont pas des Mex-Functions (par exemple la fonction exp). L'erreur viendrait-elle d'ici?

    Code:
    ------------------------------------------------------------------------
           Segmentation violation detected at Wed Aug 10 13:22:48 2005
    ------------------------------------------------------------------------
    
    Configuration:
      MATLAB Version:   7.0.4.352 (R14) Service Pack 2
      MATLAB License:   ****
      Operating System: SunOS 5.9 Generic
      Window System:    Sun Microsystems, Inc.
      Current Visual:   0x22 (class 4, depth 24)
      Virtual Machine:  Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
        (mixed mode)
      Default Charset:  ISO-8859-1
    
    Register State:
      g0 = 00000000   o0 = 00000000   l0 = 00000000   i0 = 00000000
      g1 = 0000f000   o1 = 00000003   l1 = ffbfc9c0   i1 = 00000000
      g2 = 00000000   o2 = 00000000   l2 = 0034bda8   i2 = 00000000
      g3 = 00000000   o3 = ff21b450   l3 = 0123dff0   i3 = 0123dff0
      g4 = 00102a0c   o4 = ff275318   l4 = 00000000   i4 = 00102a08
      g5 = ffbfbb4c   o5 = 0034bda8   l5 = f2441ab0   i5 = 00000000
      g6 = 00000000   sp = ffbfc010   l6 = 00000000   fp = ffbfc150
      g7 = fcbb0000   o7 = f244233c   l7 = 00000000   i7 = fec68534
      pc = ff21bf54  psr = fe401007
    
    Stack Trace:
      [0] libmx.so:mxGetPr(0, 3, 0, 0xff21b450) + 4 bytes (leaf)
      [1] sigmoidSVM.mexsol:mexFunction~(0, 0, 0, 0x0123dff0) + 2100 bytes
      [2] libmex.so:mexRunMexFile(2, 0xffbfc9c0, 0xfec7a724, 0xffbfca20) + 108 bytes
      [3] libmex.so:void Mfh_mex::dispatch_file(int,mxArray_tag**,int,mxArray_tag**)(0x00926fc0 "þǦ<", 0, 0xffbfc9c0, 2) + 448 bytes
      [4] libmwm_dispatcher.so:void Mfh_file::dispatch_fh(int,mxArray_tag**,int,mxArray_tag**)(0x00926fc0 "þǦ<", 2, 0xffbfc9c0, 2) + 276 bytes
      [5] libmwm_interpreter.so:inDispatchFromStack(1, 0xfec7a63c, 2, 2) + 1316 bytes
      [6] libmwm_interpreter.so:inCallFcnFromReference(0xfe855558, 0x010fdaf4, 6, 25600) + 376 bytes
      [7] libmwm_interpreter.so:int inInterp(inDebugCheck,int,int,opcodes,volatile inPcodeNest_tag*)(0xfebdba35, 0, 2, 0xfebdbb5c) + 8624 bytes
      [8] libmwm_interpreter.so:int inInterPcodeSJ(inDebugCheck,volatile int,volatile int,opcodes,inPcodeNest_tag*)(1, 0x00b44630, 3, 0) + 244 bytes
      [9] libmwm_interpreter.so:int inExecuteMFunctionOrScript(Mfh_mp*,bool)(0xfebdba38, 0x010fb990, 0xffbfce18, 0xffbfcf3c) + 976 bytes
      [10] libmwm_interpreter.so:inExecCompScript(0, 0xffbfd320, 0x01065dc0 "þ½È<", 26088) + 624 bytes
      [11] libmwm_interpreter.so:void Mfh_mp::dispatch_file(_mdUnknown_workspace*,int,mxArray_tag**,int,mxArray_tag**)(0x01065dc0 "þ½È<", 0xffbfd090, 0, 0xffbfd320) + 328 bytes
      [12] libmwm_interpreter.so:void Mfh_mp::dispatch_file(int,mxArray_tag**,int,mxArray_tag**)(0x01065dc0 "þ½È<", 0, 0xfe88dd4c, 0) + 32 bytes
      [13] libmwm_dispatcher.so:void Mfh_file::dispatch_fh(int,mxArray_tag**,int,mxArray_tag**)(0x01065dc0 "þ½È<", 0, 0xffbfd320, 0) + 276 bytes
      [14] libmwm_interpreter.so:inDispatchFromStack(0xffffffff, 0xfebdc83c "þµèÈ", 0, 0) + 1316 bytes
      [15] libmwm_interpreter.so:opcodes inDispatchCall(const char*,int,int,int,int*,int*)(0x004bd6c4 "classifSVM", 494, 0, 0) + 208 bytes
      [16] libmwm_interpreter.so:int inInterp(inDebugCheck,int,int,opcodes,volatile inPcodeNest_tag*)(0x004bd6c4 "classifSVM", 0, 0, 25600) + 4632 bytes
      [17] libmwm_interpreter.so:int inInterPcodeSJ(inDebugCheck,volatile int,volatile int,opcodes,inPcodeNest_tag*)(2, 0, 0, 0) + 244 bytes
      [18] libmwm_interpreter.so:inInterPcode(2, 1288, 3522064, 26428) + 76 bytes
      [19] libmwm_interpreter.so:inExecutionStatus in_local_call_eval_function(int*,_pcodeheader*,int*,mxArray_tag**,inDebugCheck)(0, 0xffbfe0f8, 0xffbfe208, 0xffbfe294) + 148 bytes
      [20] libmwm_interpreter.so:inExecutionStatus inEvalStringWithIsVarFcn(_memory_context*,const char*,EvalType,int,mxArray_tag**,inDebugCheck,_pcodeheader*,int*,bool(*)(void*,const char*)extern"C",void*)(0xff3383dc, 0, 0xfeb5c4e5, 0xffbfe0f8) + 2688 bytes
      [21] libmwm_interpreter.so:inEvalString(1100, 1024, 0, 0) + 84 bytes
      [22] libmwm_interpreter.so:inExecutionStatus inEvalCmdWithLocalReturnandtype(const char*,int*,inDebugCheck)(0x00c03c90 "classifSVM\n", 0, 2, 27648) + 84 bytes
      [23] libmwm_interpreter.so:inEvalCmdNoEnd(0x00c03c90 "classifSVM\n", 1085428, 0x00c03c90 "classifSVM\n", 0xff2b0804) + 12 bytes
      [24] libmwbridge.so:mnParser(0xff019889 "@@@", 0xffbfe41c, 2048, 0xff378240) + 1216 bytes
      [25] libmwmcr.so:void mcrInstance::mnParser()(0x004e7af8, 0xffbfe518, 119208, 138472) + 116 bytes
      [26] MATLAB:int mcrMain(int,char**)(1, 139520, 0xffbfe824, 0xffbff02c) + 344 bytes
      [27] MATLAB:main(1, 0xffbff0f4, 0xffbff0fc, 139264) + 8 bytes
      [28] MATLAB:_start(0, 0, 0, 0) + 264 bytes
    
    This error was detected while a MEX-file was running.  If the MEX-file
    is not an official MathWorks function, please examine its source code
    for errors.  Please consult the External Interfaces Guide for information
    on debugging MEX-files.
    
    If it is an official MathWorks function, 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:
           /****/******/matlab_crash_dump.16523
    
      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.
    
    Error in ==> classifSVM at 90
            [A, B] = sigmoidSVM(Ysig, Ytr);

    -----

  2. #2
    invite041307ce

    Re : Matlab - Mex-Functions

    Un petit up au cas où.

Discussions similaires

  1. Matlab 3D
    Par invite0e5e63ed dans le forum Logiciel - Software - Open Source
    Réponses: 1
    Dernier message: 06/03/2007, 08h27
  2. Produits de Dirac functions / Delta functions
    Par PHENIXian dans le forum Mathématiques du supérieur
    Réponses: 5
    Dernier message: 18/08/2006, 19h03
  3. Probleme avec les mex files : utilisation du fortran en matlab
    Par invite0f0e4005 dans le forum Mathématiques du supérieur
    Réponses: 0
    Dernier message: 04/07/2006, 14h41
  4. mex fonction matlab/c
    Par invite8ff54149 dans le forum Logiciel - Software - Open Source
    Réponses: 5
    Dernier message: 18/05/2006, 13h48
  5. [MatLab] Sb2Sl => Matlab classique = pb intégration.
    Par invite6e6d5361 dans le forum Logiciel - Software - Open Source
    Réponses: 0
    Dernier message: 03/08/2005, 21h02
Découvrez nos comparatifs produits sur l'informatique et les technologies.