Code covered by the BSD License
-
BLspline_install
function BLspline_install
-
DP=polyderiv(P, ivar)
function DP=polyderiv(P, ivar);
-
P=scalefun(P, S)
-
bsxarg(A,B)
bsxarg does singleton expansion of two input arrays (related to bsxfun)
-
bsxfun2006(fun,A,B)
bsxfun20062006 does binary operation with singleton expansion (uses bsxarg)
-
dim=getdim(s)
-
evalder(funstruct, ivar, vara...
-
evalfct(funstruct, varargin)
-
getmexopts(Tag)
function res = getmexopts(Tag)
-
idx=find_idx(xi, xgrid, optio...
function idx=find_idx(xi, xgrid)
-
isgrid(varargin)
-
pp=spline2pp(sp)
function pp=spline2pp(sp);
-
s=testderivative
function s=testderivative
-
spline1d(x,z,xi,action,option...
-
splineinfo(s, varargin)
-
splineinfo_nocheck(s, varargi...
-
splinend(n, varargin)
Complete argument lists:
-
testspline
function testspline
-
value=getoption(options, fiel...
function value=getoption(options, field, defaultvalue);
-
varargout=duplicate(varargin)
-
findidxmex.m
-
View all files
from
Spline derivative
by Bruno Luong
Compute spline function and its derivative
|
| getmexopts(Tag)
|
function res = getmexopts(Tag)
% function res = getmexopts(Tag)
% Get the MCC or MEX configuration
% Author Bruno Luong <brunoluong@yahoo.com>
% Last update: 29-Jun-2009
if ispc()
optpath=prefdir;
optfile=[optpath filesep 'compopts.bat'];
mexoptfile=[optpath filesep 'mexopts.bat'];
else
optpath=matlabroot;
optfile=[optpath '/bin/mbuildopts.sh'];
mexoptfile=[optpath '/bin/mexopts.sh']; % not sure correct path
end
% Try to get MEX option first
fid=fopen(mexoptfile,'r');
if fid<=0
% Next MCC options
fid=fopen(optfile,'r');
end
if fid>0
iscompilerline=@(S) (strcmp(S,['set ' Tag]));
C=textscan(fid,'%s %s', 'delimiter', '=', 'whitespace', '');
fclose(fid);
cline=find(cellfun(iscompilerline,C{1}));
if isempty(cline)
error('getmexopt [Bruno]: cannot get Tag %s', Tag)
end
res=C{2}{cline};
root=regexprep(matlabroot,'\\','\\\\');
res = regexprep(res,'%MATLAB%',root);
else
error('getmexopts [Bruno]: cannot open comopts.bat file')
end
% Bruno
|
|
Contact us at files@mathworks.com