Code covered by the BSD License  

Highlights from
matlab2fmex

image thumbnail

matlab2fmex

by

 

03 Feb 2004 (Updated )

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.

out=gethighesttemp(funstr,typestr);
function out=gethighesttemp(funstr,typestr);
out=0;
if strcmp(typestr,'r')
 spots=findstr('mxTR',funstr);
 for i=1:length(spots)
  if str2num(funstr(spots(i)+4))>out
   out=str2num(funstr(spots(i)+4));
  end
 end
elseif strcmp(typestr,'c')
 spots=findstr('mxTC',funstr);
 for i=1:length(spots)
  if str2num(funstr(spots(i)+4))>out
   out=str2num(funstr(spots(i)+4));
  end
 end
elseif strcmp(typestr,'i')
 spots=findstr('mxTI',funstr);
 for i=1:length(spots)
  if str2num(funstr(spots(i)+4))>out
   out=str2num(funstr(spots(i)+4));
  end
 end
end

Contact us