Code covered by the BSD License  

Highlights from
Spline derivative

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

value=getoption(options, field, defaultvalue)
function value=getoption(options, field, defaultvalue)
% function value=getoption(options, field, defaultvalue);
% Get a value from a structure options with defaultvalue
%

if nargin<3
    defaultvalue=[];
end
if isfield(options,field)
    value=options.(field);
else
    value=defaultvalue;
end

Contact us at files@mathworks.com