help-octave
[Top][All Lists]
Advanced

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

Re: mex and cell array support


From: Miroslaw Dach
Subject: Re: mex and cell array support
Date: Tue, 17 Oct 2006 15:44:20 -0500
User-agent: Thunderbird 1.5.0.7 (X11/20060915)

Thank you for your hints. I have installed and compiled octave2.9.9 package.
I have noticed that there is the Matlab mex function support built in that release but it is not clear to me how to use that.

I have the c++ file which was originally created to be used with Matlab. It contains the function call
mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {

which is specific for Matlab. The Octave counterpart c++ file should contain the DEFUN_DLD function instead.

I have noticed that mkoctfile program got a new flag --mex but i did not find any instruction how to generate the octave like dynamic library out of the Matlab like c++ file. Would you be so kind to instruct me how to proceed to do so. In addition to the Matlab like c++ file I have to link the stand alone and dynamic libraries which contain function calls from original Matlab like c++ file. My development platform is the PC with Linux (2.4 kernel gcc version 3.2 20020903 )

I will be very grateful for your help

Best Regards

Miroslaw Dach

John W. Eaton wrote:
On 16-Oct-2006, Miroslaw Dach wrote:

| Dear All,
| | I have a Matlab function which I wanted to convert to the octave | compatible file. I use octave 2.1.73 and I have recently installed | octave-forge-2006.07.09 package which contains the mex project to | support Matlab mex compiler and suitable Matlab functions. That package | looks great but when I tried to compile the Matlab function it was clear | that not all functions are implemented like: | | mexLock
| mexUnlock
| mxCreateScalarDouble
| mxGetCell
| mxCreateCellArray
| mxSetCell
| mxCreateCellMatrix
| mxIsCell
| mxDuplicateArray
| | Most of them refer to the Cell array support. Do you know how to do the | work around. Is there any chance to get the update of the mex package | which support cell arrays?

Octave 2.9.9 has much more complete mex functions.

jwe



reply via email to

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