Code covered by the BSD License  

Highlights from
B-spline tools

B-spline tools

by

 

22 Mar 2010 (Updated )

Basic toolbox for polynomial B-splines on a uniform grid. OO overloading of common operators.

mirrorbound_2(x, bidx, bdms)
function x_bound = mirrorbound_2(x, bidx, bdms)
    dms = 1:ndims(x);
    
    if not(iscell(bidx))
        bidx = {bidx};
    end

    % Construct multidimensional subscript
    inidx = cell(size(dms));

    for dm = dms
        inidx{dm} = ':';
    end

    M = size(x);
    
    for bi = 1:length(bdms)
        dm = bdms(bi);
        inidx{dm} = mirroridx_hs(bidx{bi}, M(dm));
    end
    
    x_bound = x(inidx{:});

Contact us