Code covered by the BSD License  

Highlights from
matlab2fmex

image thumbnail
from matlab2fmex by Ben Barrowes
matlab2fmex.m is a small translator which aims to convert numerical M-files to Fortran90 mex.

[count,whichone]=typeofvar(str,inoutother,cw);
function [count,whichone]=typeofvar(str,inoutother,cw);
thisstr=str;
if ~isempty(findstr(str,'_f')), thisstr=str(1:(findstr(str,'_f')-1)); end
if length(find(strcmp(thisstr,inoutother{1})))>0, whichone=1; end
if length(find(strcmp(thisstr,inoutother{2})))>0, whichone=2; end
if length(find(strcmp(thisstr,inoutother{3})))>0, whichone=3; end
if ~isreal(getfield(cw,thisstr))
 count=1;
else
 count=0;
end

Contact us at files@mathworks.com