[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can Octave run Matlab code that contains DLL files?
From: |
David Bateman |
Subject: |
Re: Can Octave run Matlab code that contains DLL files? |
Date: |
Tue, 27 Mar 2007 21:42:36 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
John W. Eaton wrote:
> On 27-Mar-2007, Steve C. Thompson wrote:
>
> | Dear Group,
> |
> | I'm trying to get some Matlab code running in Octave.
> | Specifically,
> |
> | http://www.iterativesolutions.com/Matlab.htm ,
> |
> | which has a good library of channel codecs. (If you know of
> | turbo, convolutional, etc., codecs that run in Octave, please
> | drop me a message). Some of the intensive routines are MEXified
> | resulting in a directory of .dll files. Can Octave run such a
> | thing? I've heard people discussing MEX support, but I'm not
> | entirely sure what that means. Does it mean the developmental
> | version of Octave (2.9.9) will run this code? I'm running the
> | older:
> |
> | octave --version
> | GNU Octave, version 2.1.73 (i486-pc-linux-gnu)
> |
> | Thanks!
>
> If you need MEX support, try 2.9.10.
>
> You'll have to build the MEX files from source. I think there is no
> way for Octave to handle binary MEX files built for Matlab (as I
> recall, they are linked against Matlab libraries).
>
> Octave doesn't have matrix.h (on case-insenstivive filesystems it
> conflicts with the Matrix.h header we already have) but you shouldn't
> need it anyway, even with Matlab. So the "#include <matrix.h>" lines
> can be removed from the source files.
>
> jwe
I just used the script
<quote>
#! /bin/sh -f
files=`find . -name "*.c"`
for _file in $files; do
_newfile=`echo ${_file} | sed -e "s/\.c$/_new.c/"`
_outfile=`echo ${_file} | sed -e "s/\.c$/.oct/"`
echo "Build $_file"
cat $_file | sed -e 's/#include <matrix.h>//' > $_newfile
mkoctfile -o $_outfile --mex $_newfile
rm $_newfile
done
rm *.o
</quote>
in the cml/source directory of th latest version and built sucessfully
all of the mex files with 2.9.10 (or at least close enough to 2.9.10
that it makes no differemce)
D.