| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Spline Toolbox |
| Contents | Index |
| Learn more about Spline Toolbox |
For example,
circle = rsmak('circle');
provides a rational spline whose values on its basic interval trace out the unit circle, i.e., the circle of radius 1 with center at the origin, as the command
fnplt(circle), axis square
readily shows; the resulting output is the circle in A Circle and an Ellipse, Both Given By a Rational Spline.
A Circle and an Ellipse, Both Given By a Rational Spline

It is easy to manipulate this circle to obtain related shapes. For example, the next commands stretch the circle into an ellipse, rotate the ellipse 45 degrees, and translate it by (1,1), and then plot it on top of the circle.
ellipse = fncmb(circle,[2 0;0 1]); s45 = 1/sqrt(2); rtellipse = fncmb(fncmb(ellipse, [s45 -s45;s45 s45]), [1;1] ); hold on, fnplt(rtellipse), hold off
As a further example, the "circle" just constructed is put together from four pieces. We highlight the first such piece, by the following commands:
quarter = fnbrk(fn2fm(circle,'rp'),1); hold on, fnplt(quarter,3), hold off
In the first command, fn2fm is used to change forms, from one based on the B-form to one based on the ppform, and then fnbrk is used to extract the first piece, and this piece is then plotted on top of the circle in A Circle and an Ellipse, Both Given By a Rational Spline, with linewidth 3 to make it stand out.
![]() | Introduction | Example: Sphere | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |