No BSD License  

Highlights from
writing fortran mex file

from writing fortran mex file by Alain Barraud
fortran mex file which call user matlab function with varargin argument.

testfzd
function testfzd
% a simple test example
p1=5;p2=[-5,2];% user parameters
%look at f(x)
x=(0:0.01:2);y=ff(x,p1,p2);
plot(x,y)
% call the matlab solver
[x,k]= fzdm(@ff,0,2,1e-10,p1,p2);
% call the fortran dll
[x,k]=fzd(@ff,0,2,1e-10,p1,p2);
%a test function
function fx=ff(x,p1,p2)
fx=p1*x+p2(1)*exp(-x*p2(2));
%%%%%%%%%%%%%%%%%%%%%%%%%%%

Contact us at files@mathworks.com