Be the first to rate this file! 27 downloads (last 30 days) File Size: 134.28 KB File ID: #17970

Tutorial: C mex matrix demo

by Nick Clark

 

11 Dec 2007 (Updated 21 Dec 2007)

Code covered by the BSD License  

Index matrix in C like you would do in MATLAB!

Download Now | Watch this File

File Information
Description

This short tutorial illustrates basic numerical matrix computation in C. I encourage any comments from expirienced mex programmers for style improvement.

This is a nice little function to demonstrate how you can interface MATLAB and C style matricies. There is some example code included showing how you can index your C matricies like you can in MATLAB and how you can use a little function to pass data between them. The actual function is trivial, but illustrates different methods of handling multi-dimensional data using pointers.

This latest version includes updates and copies emails regarding different methods from James Tursa.

MATLAB release MATLAB 7.4 (R2007a)
Zip File Content  
Other Files mexPythagDemo2.c,
mexPythagDemo3.c,
README.pdf,
mexPythagDemo1.c
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.
Updates
21 Dec 2007

* New files added
* PDF instructions and email contributions from other authors added.

Tag Activity for this File
Tag Applied By Date/Time
optimization Nick Clark 22 Oct 2008 09:39:04
array Nick Clark 22 Oct 2008 09:39:04
vectorize Nick Clark 22 Oct 2008 09:39:04
guide Nick Clark 22 Oct 2008 09:39:04
bsxfun Nick Clark 22 Oct 2008 09:39:04
c Nick Clark 22 Oct 2008 09:39:04
tutorial Nick Clark 22 Oct 2008 09:39:04
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com