How to plot a cubic spline from the coefficients?
Mostrar comentarios más antiguos
I have a custom function myspline that returns the coefficients for a natural cubic spline as four vectors a,b,c and d which contain the appropriate part of the spline coefficients.
Now I'm supposed to plot the entire spline (in one plot) in a script, the assignment says the evaluation from coefficients to function should make use of Horner.
How would I go about doing this? I've tried to hard-code the multiple functions of the spline with the coefficients, then to plot those; I've also tried multiple different plot fuctions such as plot2sym and fplot that could make use of the coefficients directly.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spline Postprocessing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!