how to do spline without spline

hello i need to do that the function spline do to a data without using this function someone can help me

Answers (1)

Voss
Voss on 18 Dec 2021
From the spline documentation page: "You also can perform spline interpolation using the interp1 function with the command interp1(x,y,xq,'spline')."
There you have it: you can do spline interpolation without calling the spline function by calling the interp1 function with the 'spline' option.

6 Comments

no i need to do a leniear interpolotion without commond that do it
i need to write the code
"i need to write the code"
What did you try so far?
i dont know were to start
i need to compare a spline commond to a code that i will write but i dont know were to start
Stephen23
Stephen23 on 18 Dec 2021
Edited: Stephen23 on 18 Dec 2021
"i dont know were to start"
You should start by deciding if you need to do spline interpolation or linear interpolation, because so far you have written both. Do you know the difference? Do you know what interpolation is?
So, what does your homework actually ask you to do?
i need to do the linear interpolation
my home work ask me to record me walking with matlab sensors
then do with the data spline interpolation
and to do a linear interpolation and compare them
then i need to up my sample rate to 500Hz from 50 Hz without using the build in commond like resample
the do fft and colculate the staps that i made
You can find plenty of tutorials online that explain how linear and spline interpolation works.
Have you read any? What material are you allowed to use for your homework?

Sign in to comment.

Categories

Find more on Interpolation in Help Center and File Exchange

Asked:

on 18 Dec 2021

Commented:

on 18 Dec 2021

Community Treasure Hunt

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

Start Hunting!