5.0

5.0 | 2 ratings Rate this file 14 Downloads (last 30 days) File Size: 134.28 KB File ID: #17970
image thumbnail

Tutorial: C mex matrix demo

by Nick Clark

 

11 Dec 2007 (Updated 21 Dec 2007)

Index matrix in C like you would do in MATLAB!

| 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)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
01 Aug 2011 Nitin Kumar  
27 Sep 2011 Jeong Kim

The tutorial helped a lot.

Thanks.

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

Contact us at files@mathworks.com