Code covered by the BSD License  

Highlights from
Spline derivative

image thumbnail
from Spline derivative by Bruno Luong
Compute spline function and its derivative

BLspline_install
function BLspline_install
% function BLspline_install
% Installation by building the C-mex files for BLSpline package
%
% Author Bruno Luong <brunoluong@yahoo.com>
% Last update: 11-Aug-2009

arch=computer('arch');
mexopts = {'-v' '-O' ['-' arch]};
% 64-bit platform
if ~isempty(strfind(computer(),'64'))
    mexopts(end+1) = {'-largeArrayDims'};
end

if ispc()
    compiler = getmexopts('COMPILER');
    islcc = strcmpi(compiler,'lcc');
    % Define the C-symbol for LCC compiler
    if islcc
        mexopts(end+1) = {'-D_LCC'};
    end
end

% Mex Mex functions
mex(mexopts{:},'findidxmex.c');
bsxfunloc = which('bsxfun');
if isempty(strfind(bsxfunloc,'built-in'))
    mex(mexopts{:},'bsxarg.c');
end

Contact us at files@mathworks.com