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.

outflag=inmlcall(i,spot,funstr,funstrwords,funstrwords_b);
function outflag=inmlcall(i,spot,funstr,funstrwords,funstrwords_b);
outflag=0;found=0;place=0;
for j=spot:-1:1
 if place==0
  if strcmp(funstr{i}(j),'(')
   found=found+1;
  elseif strcmp(funstr{i}(j),')')
   found=found-1;
  end
  if found==1
   place=j;
  end
 end
end
temp=find(funstrwords_b{i}(funstrwords_b{i}<place));
if ~isempty(temp)
 temp=temp(length(temp));
 if strcmp(funstrwords{i}{temp},'mlcall')
  outflag=1;
 end
end

Contact us