help-octave
[Top][All Lists]
Advanced

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

Issues running mex file


From: DONATI, KORY D CTR USAF AFSPC WROCI/InDyne
Subject: Issues running mex file
Date: Thu, 16 May 2013 21:56:09 +0000

Hello,
I am having a problem using mex files in Octave on my workstation. The mex
file I am trying to use was originally written for matlab.  The mex file
loads a binary file, locates specified values within the file, then loads
them into the matlab workspace to be saved or manipulated. After some
tweaking to the source code, I was able to create a mex file within Octave
with the mkoctfile --mex option. However, when I attempted to call this
file, I would receive various errors. After tracking down the cause, it
appears that the data is not loaded into the correct octave workspace to be
used by the calling function. However, once control is returned to the
command prompt, I can see and use the variable I tried to use in the
function.

Due to the complexity of the source code I was using, I decided to write my
own basic mex file that loaded static variables into the calling workspace.
Attached is the simplified mex function in C (load_array.c) and its driver
(Load_Array_Driver.m). I have a similar problem with this file as I do with
my original mex file. I am new to using mex files, so I might have some
oversights. 

My steps:
1. Compile mex file with: mkoctfile --mex load_array.c
2. Execute: Load_Array_Driver

Any help is appreciated,
Kory Donati



//Signed//
Kory Donati
Vandenberg Air Force Base
InDyne, Inc., Performance Evaluation Branch
(805) 606-8298 (805) 605-0237
address@hidden


Attachment: Load_Array_Driver.m
Description: Binary data

Attachment: load_array.c
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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