Be the first to rate this file! 3 Downloads (last 30 days) File Size: 4.41 KB File ID: #19864
image thumbnail

Fortran mxCreateLogicalSparseMatrix

by James Tursa

 

09 May 2008 (Updated 12 May 2008)

The Fortran version of the mxCreateSparseLogicalMatrix function for mex and engine apps

| Watch this File

File Information
Description

There are several mex and engine functions available for C programmers that are curiously missing for Fortran programmers. My other submissions cover many of these omissions. I think this current submission completes the list and fills is the last of the Fortran mex & engine routines that were missing from MATLAB's supplied API.

mxCreateSparseLogicalMatrix does the same thing as the C counterpart, i.e. it creates a sparse logical matrix with the requested parameters. There are two test driver routines supplied:

1) mexTestCreateSparseLogicalMatrix.for is a mex routine for testing the function.

2)engTestCreateSparseLogicalMatrix.for is an engine application for testing the function.

I had to accomplish the function differently in mex routines vs engine applications, so there are actually two different functions in the mxCreateSparseLogicalMatrix.for file. You select one or the other depending on whether or not the following define is present:

#define _ENGINE

Or, of course, you could just copy & paste the appropriate function into your source file.

MATLAB release MATLAB 7.4 (R2007a)
Other requirements Any supported Fortran compiler.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
external interface James Tursa 22 Oct 2008 10:00:27
mex James Tursa 22 Oct 2008 10:00:27
logical James Tursa 22 Oct 2008 10:00:27
sparse James Tursa 22 Oct 2008 10:00:27
engine James Tursa 22 Oct 2008 10:00:27
fortran James Tursa 22 Oct 2008 10:00:27

Contact us at files@mathworks.com