How to plot bsplines?

조회 수: 2 (최근 30일)
Praveen Kumar Kandavel
Praveen Kumar Kandavel 2021년 6월 21일
답변: Vaibhav 2023년 10월 13일
I have x and y points in the attached file. I could not plot bspline using these points.
Can someone help me with this?

답변 (1개)

Vaibhav
Vaibhav 2023년 10월 13일
Hi Praveen,
"bspline(t)" plots the B-spline with knot sequence "t", as well as the polynomial pieces of which it is composed.
“bspline(t, window)” plots the B-spline with knot sequence "t", as well as the polynomial pieces of which it is composed, in the subplot specified by "window".
You can refer the following code snippet below for utilizing the "bspline" function:
% first create a knot sequence. A knot sequence must be non-decreasing
x = [0 1.5 2.3 4 5];
% Then plot the B-spline with knot sequence "x", as well as its polynomial pieces, by using the bspline function
bspline(x)
% Create a second knot sequence.
y = [2 3 4 5];
% Plot the B-spline with knot sequence y in the same figure but in a different subplot.
bspline(x,1)
bspline(y,2)
You can refer to the below MathWorks documentation to know more about "bspline" and splines in curve fitting toobox:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Splines에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by