Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Australia MyPost shipping For Magento 2 1.0.0
Australia Post eParcel For Magento 1.1.1
Source Control for SQL Server 2.0
Answers phpSoftPro 3.12
Exlcart 2.0
School College ERP 1.3.2
White-label Grocery Delivery App Solution 2.0
Top Code
Quick Cam 1.0
FastCube 1.9
idxScout 2.0.0
CamStudio 2.0
channel3 0.0.1
iqtread.m 1.0
Annonces 1.2.4
FAQEngine 4.16.04
rGallery 1.0
Marinelli 7.x-3.0-beta6
Strongarm 7.x-2.0-beta4
JavaTeam 5.5.5.1.2
SNMP#NET 0.9.3
OpenMCDF 2
CIP IDLE 090503
Top Rated
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Fast B-spline class 1.0
File ID: 83552






Fast B-spline class 1.0
Download Fast B-spline class 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 60
Submit Rating:
Fast B-spline class 1.0 Description
Description: fastBSpline - A fast, lightweight class that implements
non-uniform B splines of any order

Matlab's spline functions are very general. This generality comes at
the price of speed. For large-scale applications, including model
fitting where some components of the model are defined in terms of
splines, such as generalized additive models, a faster solution is
desirable.

The fastBSpline class implements a lightweight set of B-spline
features, including evaluation, differentiation, and parameter fitting.
The hard work is done by C code, resulting in up to 10x acceleration
for evaluating splines and up to 50x acceleration when evaluating
of spline derivatives.

Nevertheless, fastBSplines are manipulated using an intuitive, high-
level object-oriented interface, thus allowing C-level performance
without the messiness. Use CompileMexFiles to compile the required
files. If mex files are not available, evaluation will be done in .m
code, so you may still use the code if you can't use a compiler for your
platform.

B splines are defined in terms of basis functions:

y(x) = sum_i B_i(x,knots)*weights_i

B (the basis) is defined in terms of knots, a non-decreasing sequence
of values. Each basis function is a piecewise polynomial of order
length(knots)-length(weights)-1. The most commonly used B-spline is
the cubic B-spline. In that case there are 4 more knots than there
are weights. Another commonly used B-spline is the linear B-spline,
whose basis function are shaped like tents, and whose application
results in piecewise linear interpolation.

The class offers two static functions to fit the weights of a spline:
lsqspline and pspline. It includes facilities for computing the basis
B and the derivatives of the spline at all points.

Constructor:

sp = fastBSpline(knots,weights);

Example use:

%Fit a noisy measurement with a smoothness-penalized spline (p-spline)
x = (0:.5:10)';
y = sin(x*pi*.41-.9)+randn(size(x))*.2;
knots = [0,0,0,0:.5:10,10,10,10];
%Notice there are as many knots as observations

%Because there are so many knots, this is an exact interpolant
sp1 = fastBSpline.lsqspline(knots,3,x,y);
%Fit penalized on the smoothness of the spline
sp2 = fastBSpline.pspline(knots,3,x,y,.7);

clf;
rg = -2:.005:12;
plot(x,y,'o',rg,sp1.evalAt(rg),rg,sp2.evalAt(rg));
legend('measured','interpolant','smoothed');

fastBSpline properties:
outOfRange - Determines how the spline is extrapolated outside the
range of the knots
knots - The knots of the spline (read only)
weights - The weights of the spline (read only)

fastBSpline Methods:
fastBSpline - Construct a B spline from weights at the knots
lsqspline - Construct a least-squares spline from noisy measurements
pspline - Construct a smoothness-penalized spline from noisy
measurements
evalAt - Evaluate a spline at the given points
getBasis - Get the values of the underlying basis at the given points
Btimesy - Evaluate the product getBasis(x)'*y
dx - Returns another fastBSpline object which computes the derivative of
the original spline

Disclaimer: fastBSpline is not meant to replace Matlab's spline functions;
it does not include any code from the Mathworks

License: Shareware

Related: noisy, Measurement, fastbsplineknotsweights, Constructor, Computing, points, smoothnesspenalized

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 60



More Similar Code

Computes the H-infinity optimal causal filter (indirect B-spline filter) for the cubic spline.

[INPUT]
d: delay

[OUTPUT]
psi: the optimal filter psi(z) in a TF object
gopt: optimal value

This file is based on the following paper:
M. Nagahara and Y. Yamamoto,
H-infinity optimal approxmation for causal spline interpolation,
Signal Processing, Vol. 91, No. 2, pp. 176-184, 2011.



B-splines is a natural signal representation for continous signals, where
many continous-domain operations can be carried out exactly once the
B-spline approximation has been done.

The B-spline estimation procedure in this...



The package comprises of a graphical utility to place uniform B-spline control points and see how the B-spline is redrawn as control points or control point weights are adjusted, and functions to estimate B-splines with known knot vector, given a...



This toolbox contains all the functions necessary for extraction and registration of medical RTOG images using a cubic-B-spline free form deformation technique. The optimization routine uses a difference of squares along with smoothness and...



This patch for PHP will allow multiple class inheritance:class A { public $a = 1;}class B { public $b = 2;}class C extends A, B { public $c = 3;}$c = new C() ;echo $c->a; // 1echo $c->b; // 2echo $c->c; // 3



Matlab class that creates an interactive, closed spline which can be used as a region of interest. Can be used to select regions in an image



VVAR uses a pre-existing "scratch" file to store variables and can be used to pre-allocate a huge array much faster than using zeros. On a MacBook Pro with 64 bit MATLAB and 4Gb RAM, creating an 8Gb double array with VVAR was 100x faster...



Usage: [mfRefinedMesh, mnTriangulation] = LoopSubdivisionLimited( mfMeshPoints, mnTriangulation, fMinResolution, vbBoundaryEdges)

This function sub-divides surface meshes, using the Loop subdivision algorithm [1]. This algorithm is...



This function "refinepatch" can refine any triangular mesh surface ( patch) with 4-split spline interpolation, see screenshot.

Literature:
The spline interpolation of the face edges is done by the Opposite Edge Method,...



Single file Delphi database with comprehensive SQL support, strong encryption, BLOBs and multiuser mode support. This BDE alternative is fully compatible with standard and third-party database components and reporting engines. Absolute DB does not...

User Review for Fast B-spline class
- required fields
     

Please enter text on the image