4.25

4.2 | 4 ratings Rate this file 21 downloads (last 30 days) File Size: 156.45 KB File ID: #4443

matlab2fmex

by Ben Barrowes

 

03 Feb 2004 (Updated 23 Nov 2005)

Code covered by the BSD License  

matlab2fmex.m is a small translator which aims to convert numerical M-files to Fortran90 mex.

Editor's Notes:

This author's upload was somehow corrupted. We fixed this on March 29, 2006. At that time, we also converted it from a GZ file a ZIP file for better cross platform portability.

Download Now | Watch this File

File Information
Description

matlab2fmex.m is a small translator which aims to convert numerical MATLAB m-files to Fortran90 mex files. matlab2fmex first translates an m-file to a Fortran90 mex source file then compiles that Fortran90 file using MATLAB's mex and the local compiler. Also available at the sourceforge:
https://sourceforge.net/projects/matlab2fmex/

MATLAB release MATLAB 6.0 (R12)
Other requirements fortran90 compiler
Zip File Content  
Other Files
matlab2fmex/acosh_make.m,
matlab2fmex/acos_make.m,
matlab2fmex/acoth_make.m,
matlab2fmex/acot_make.m,
matlab2fmex/acsch_make.m,
matlab2fmex/acsc_make.m,
matlab2fmex/add_module.m,
matlab2fmex/airy_make.m,
matlab2fmex/asech_make.m,
matlab2fmex/asec_make.m,
matlab2fmex/asinh_make.m,
matlab2fmex/asin_make.m,
matlab2fmex/atanh_make.m,
matlab2fmex/atan_make.m,
matlab2fmex/besselh_make.m,
matlab2fmex/besseli_make.m,
matlab2fmex/besselj_make.m,
matlab2fmex/besselk_make.m,
matlab2fmex/bessely_make.m,
matlab2fmex/changeoperator.m,
matlab2fmex/convertconditional.m,
matlab2fmex/coth_make.m,
matlab2fmex/csch_make.m,
matlab2fmex/declare_globals.m,
matlab2fmex/determineshape.m,
matlab2fmex/diag_make.m,
matlab2fmex/dot1_make.m,
matlab2fmex/dot2_make.m,
matlab2fmex/eig_make.m,
matlab2fmex/findBefore.m,
matlab2fmex/findend.m,
matlab2fmex/findlefts.m,
matlab2fmex/find_make.m,
matlab2fmex/findrights.m,
matlab2fmex/findstrexact.m,
matlab2fmex/fliplr_make.m,
matlab2fmex/flipud_make.m,
matlab2fmex/functionresultsize.m,
matlab2fmex/gammainc_make.m,
matlab2fmex/gammaln_make.m,
matlab2fmex/gamma_make.m,
matlab2fmex/getfunwordsmlonly.m,
matlab2fmex/gethighesttemp.m,
matlab2fmex/getmexoperators.m,
matlab2fmex/hasoutput.m,
matlab2fmex/hassubscript.m,
matlab2fmex/inastring.m,
matlab2fmex/inbracket.m,
matlab2fmex/inconverted.m,
matlab2fmex/inmakefunction.m,
matlab2fmex/inmlcall.m,
matlab2fmex/insubscript.m,
matlab2fmex/inwhichlast.m,
matlab2fmex/isalpha.m,
matlab2fmex/isinf_make.m,
matlab2fmex/isin.m,
matlab2fmex/iskeep.m,
matlab2fmex/isletterornumber.m,
matlab2fmex/isnameletter.m,
matlab2fmex/isnan_make.m,
matlab2fmex/isnumber.m,
matlab2fmex/isonebyone.m,
matlab2fmex/justify.m,
matlab2fmex/kb.m,
matlab2fmex/length_make.m,
matlab2fmex/linspace_make.m,
matlab2fmex/makeheader.m,
matlab2fmex/makeMATLABcallstring.m,
matlab2fmex/makeMexcallbackmodule.m,
matlab2fmex/make_mex_gateway.m,
matlab2fmex/make_mex_subroutine.m,
matlab2fmex/makemultioutput.m,
matlab2fmex/makesize1.m,
matlab2fmex/makesize2.m,
matlab2fmex/matlab2fmex.m,
matlab2fmex/matlab2fmex_save.m,
matlab2fmex/max_make.m,
matlab2fmex/mean_make.m,
matlab2fmex/median_make.m,
matlab2fmex/min_make.m,
matlab2fmex/needdouble.m,
matlab2fmex/need_ss2in.m,
matlab2fmex/norm_make.m,
matlab2fmex/ones_make.m,
matlab2fmex/parsevarargin.m,
matlab2fmex/prod_make.m,
matlab2fmex/replaceword.m,
matlab2fmex/repmat_make.m,
matlab2fmex/reshape_make.m,
matlab2fmex/sech_make.m,
matlab2fmex/showall.m,
matlab2fmex/size_make.m,
matlab2fmex/ss2in_make.m,
matlab2fmex/sum_make.m,
matlab2fmex/svd_make.m,
matlab2fmex/typeofvar.m,
matlab2fmex/updatefunstr_full.m,
matlab2fmex/updatefunstr.m,
matlab2fmex/updatetemp.m,
matlab2fmex/wordconverter.m,
matlab2fmex/zeros_make.m,
matlab2fmex/README,
matlab2fmex/changelog,
matlab2fmex/hints
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
06 Feb 2004 turbulence student

good!
thanks a lot!

18 Nov 2005 Christopher Hoen

How do I extract the content of the file that I download?

Have tried Cygwin tar and WinZip, but noen of them works. The name of the file seems strange also:

matlab2fmex-examples_1.1.tar.tar

25 Mar 2006 Egemen Kolemen

There is a problem with the "matlab2fmex" function's call to regexp & regexprep. I am using matlab 6.5. You need to use 'tokenize' options in order to specify '$' in these two matlab functions. Below I posted the fixed version. All I did was to add a 'tokenize' option in all the calls to regexp & regexprep then everything works fine.

2 more problems you may face while using these functions:
1. the variables are not case sensitive. if you use both t and T as variables in the m file, you'll get an error.
2. don't do any calculations within the brackest i.e. convert d=[ a; a+b] to c=a+b; d=[a;c];
Additionally, the convertion make a local copy of the data before calling the function to be evaluated which is less than optimal when dealing with big data sets. You can avoid this by using pointers. See
http://www.physik3.gwdg.de/~engster/mex_fortran90.html
for details.

30 May 2006 Michal Kvasnicka

Very useful tool for number crunching apps.

30 Nov 2007 jun ziyang

Great tools!
But I found it can't deal with the following kind of code:

pt(indFPS,1) = signalGenerator(t,...
    [pump.forwardPower(:);signal.forwardPower(:)]./1000,...
    [pump.forwardShape(:);signal.forwardShape(:)],...
    [pump.forwardT0(:),signal.forwardT0(:)],...
    [pump.forwardRep(:),signal.forwardRep(:)]);

Anyone knows how to modify matlab2fmex to do the job?

thanks.

05 Sep 2008 John Brown

The final version I found at sourceforge.net is 1.21, which is released in 2005. Is there newer version of this GREAT tool!? I love this tool very much. Please DO NOT stop to update it.

Please login to add a comment or rating.
Updates
22 Nov 2005

Service release

23 Nov 2005

bug fixes

Tag Activity for this File
Tag Applied By Date/Time
matlab Ben Barrowes 22 Oct 2008 07:13:54
fortran Ben Barrowes 22 Oct 2008 07:13:54
convert Ben Barrowes 22 Oct 2008 07:13:54
mex Ben Barrowes 22 Oct 2008 07:13:54
utilities Ben Barrowes 22 Oct 2008 07:13:54
miscellaneous Ben Barrowes 22 Oct 2008 07:13:54
 

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