4.0

4.0 | 1 rating Rate this file 8 Downloads (last 30 days) File Size: 3.33 KB File ID: #8194

C & mex file example

by Mary Brzezenski

 

03 Aug 2005 (Updated 03 Aug 2005)

Sample C program with mex statements, with m-file script to run executable, and author's output in t

| Watch this File

File Information
Description

The program mex_test.c is a basic example of how to use mxArray *prhs[] in mexFunction entry embedded in C code. The executable should accept 3 input args of different data types: 1 string, 1 double and 1 int32 array. The program allows a user to input a NULL for any of the input arguments, to demonstrate some basic error handling.

A test script m-file and a text file with the author's test output is also included.

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements Windows XP platform Lcc C version 2.4 linker
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
04 Aug 2005 Robert Young

Good example code.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
development environment Mary Brzezenski 22 Oct 2008 07:54:53
mexfunction input Mary Brzezenski 22 Oct 2008 07:54:53
mex error handling Mary Brzezenski 22 Oct 2008 07:54:53
mxarray pointers Mary Brzezenski 22 Oct 2008 07:54:53

Contact us at files@mathworks.com