help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Oct Files Help -- mkoctfile


From: gOS
Subject: Re: Oct Files Help -- mkoctfile
Date: Thu, 10 Jan 2008 09:02:05 -0800 (PST)


Tatsuro MATSUOKA-2 wrote:
> 
> Hello 
> 
> This is just an error correction.  Sorry for my carelessness.
> 
> +++++++++++++
> Please try
>  
> octave> clear MexTest 
> octave> system('cmd');
> Cmdprompt> mkoctfile --verbose --mex MexTest.c #Here is modified
>  
> and report results.
> +++++++++++++++++++
> 
> Regards
> Tatsuro
> 
> 
> --- Tatsuro MATSUOKA <address@hidden> wrote:
> 
>> Dear gOS
>> 
>> > octave:10> clear MexTest
>> > octave:11> mkoctfile --mex MexTest.c
>> > MexTest.c
>> > LINK : fatal error LNK1104: cannot open file 'MexTest.mex'
>> > octave:12>
>> 
>> Please try
>> 
>> octave> clear MexTest 
>> octave> system('cmd');
>> Cmdprompt> mkoctfile -verbode --mex MexTest.c
>> 
>> and report results.
>> 
>> Regards
>> 
>> Tatsuro
>> 
>> 
>>   
>> 
>> 
>> --------------------------------------
>> Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
>> http://pr.mail.yahoo.co.jp/toolbar/
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
>> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>> 
> 
> 
> --------------------------------------
> Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
> http://pr.mail.yahoo.co.jp/toolbar/
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
> 
> 

Tatsuro,

This had no effect, and as JWE pointed out it seems to not work in Linux
Octave either, so I'm just going to run a Batch file an close down octave
every time I want to compile a mex file. Oh well, at least I can compile
things.

Thanks.

=============

Anyone Else,

Is there a listing of what mex functions are supported in Octave 3.0? I've
checked the Doc and now found any. The reason I'm asking is that I'm trying
to figure out if I am calling mxCalcSingleSubscript incorrectly for your mex
compiler. It does not throw an error, but it returns an incorrect index
which does not move beyond the first row of the file I'm trying to turn into
a Cell Array.

Here is a code sample if it helps:

=========================================

    // ** INITIALIZATIONS NOT SHOWN

    cell_dims[0] = numberOfRows;
    cell_dims[1] = numberOfColumns;
    
    plhs[0] = mxCreateCellArray(2,cell_dims);
    nsubs=mxGetNumberOfDimensions(plhs[0]);
    subs=mxCalloc(2,sizeof(int));
        
    for(i = 0; i < numberOfRows; i++) {
      line = lines[i]; // Grab next line of file
      token = (char*)strtok(line," ,"); // Grab first entry with Delimiter
      for(j = 0; j < numberOfColumns; j++) {
        charArr = mxCreateString(token);
        subs[0] = i;
        subs[1] = j;

        // **** OFFENDING LINE ***** Does not throw error, but returns
incorrect index 
        // ie(0,0:j-1) Never moves beyond first row.
        index = mxCalcSingleSubscript(plhs[0],nsubs,subs);        

        mexPrintf("J = %d, Index = %d: %s\n",j,index,token); // Print
Statement verifying bug

        // **** CRUX POINT **** mxSetCell does not set the correct cell
because index is wrong
        mxSetCell(plhs[0],index,charArr);
        if(j != numberOfColumns) {
          token = (char *)strtok(NULL," ,");
        }
      }      
    }

====================================================


-- 
View this message in context: 
http://www.nabble.com/Oct-Files-Help----mkoctfile-tp14713714p14738574.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]