I apologize for the lack of clarity in the video there. The coefficients that were printed on the page (in the large font) didn't match the calculation that I did live, which gave the coefficients in the tiny font. To build the function that I wrote by hand, I used the first row of values, [0.1008, -0.1517, 0, 0], and interpreted them as coefficients for a polynomial, in order of highest power to lowest power. Since there are 4 numbers, that means we have a cubic function. Since the interval for these coefficients started at x=0, our polynomial would be 0.1008 (x-0)^3 + (-0.1517) (x-0)^2 + 0 (x-0) + 0, which was the hand-written version. Hope that makes sense.
It depends on what you need for your application. If you've built the spline in MATLAB using the `spline` function, then the partner function `ppval` will evaluate the spline at your choice of x values. Usually I would do something like: xx = linspace(0, 10) % pick your interval for your plot yy = ppval(pp, xx) % compute the spline value at those xx values, and store in yy plot(xx, yy) % generate the graph.
Really helpful, thanks a lot
thank you
Thank you this is amazing and it helps a lot!
Thank you. It helps a lot. Can you please tell me how to construct the last equation. The equation you had written by hand. I needed that please help
I apologize for the lack of clarity in the video there. The coefficients that were printed on the page (in the large font) didn't match the calculation that I did live, which gave the coefficients in the tiny font.
To build the function that I wrote by hand, I used the first row of values, [0.1008, -0.1517, 0, 0], and interpreted them as coefficients for a polynomial, in order of highest power to lowest power.
Since there are 4 numbers, that means we have a cubic function. Since the interval for these coefficients started at x=0, our polynomial would be
0.1008 (x-0)^3 + (-0.1517) (x-0)^2 + 0 (x-0) + 0,
which was the hand-written version. Hope that makes sense.
Assalamualaikum sir I want ur help can u guide me how to draw graph of cubic polynomial spline on Matlab..
It depends on what you need for your application. If you've built the spline in MATLAB using the `spline` function, then the partner function `ppval` will evaluate the spline at your choice of x values.
Usually I would do something like:
xx = linspace(0, 10) % pick your interval for your plot
yy = ppval(pp, xx) % compute the spline value at those xx values, and store in yy
plot(xx, yy) % generate the graph.
Can u help to write a matlab code "draw a Nurbs curve by calling b spline basis function"
I have try this coding but there's error on pp=spline(x,y). Can you please help me with this?
i coded it as well: pp = spline (x,y);
This works on Matlab R2019a
@@marcsp6173 Thank you. It perfectly works now. I'm glad that you willing to help me =)
@@marcsp6173 does the space really make the difference. I’m a complete norm with coding btw lol