Interpolation - Cubic Splines - example

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии • 137

  • @noel2000lw
    @noel2000lw 4 года назад +22

    Best explanation on the Internet! Finally solved my problem with 4 Data-points!

  • @asifahmed1801
    @asifahmed1801 3 года назад +4

    Thanks a lot, you have given a better explanation than any one in the internet .

  • @benjamindeworsop8348
    @benjamindeworsop8348 5 лет назад +4

    Awesome video. No fluff, just straight explanation

  • @gerling-sprigadegbr8918
    @gerling-sprigadegbr8918 Год назад +2

    Dankeschön, endlich habe ich die Lösung! Wirklich einzigartig online.
    Das war sehr anschaulich und die Sprachbarriere war kein Problem.

  • @SSuchti4
    @SSuchti4 2 года назад +2

    one of the videos that shows me how higher math works spot on.
    Thank you dude, you filled wholes in my understanding i couldn't fill myself :)

  • @joeychou5212
    @joeychou5212 6 лет назад +9

    Thank you so much! You made a good explanation of cubic spline. I suffer a lot from understanding the concepts in numerical analysis and using Mathematica. I hope that I could have found your videos earlier for this semester.

  • @iftakharalam1650
    @iftakharalam1650 6 лет назад +4

    you are the best explainer among the cubic spline lecture videos. also, you are the great explainer. Thanks for making this type of video. our professors are very lazy to explain.

    • @the-Math-guy
      @the-Math-guy  6 лет назад +1

      Thank you for taking the time to give such a nice comment. Appreciate it!!

  • @adammed8667
    @adammed8667 2 года назад +21

    4th equation in the matrix, b1 should be equal to zero, and c1=-1. Anyway, thanks for the video, very very very helpful!!

  • @saranga4603
    @saranga4603 4 года назад +2

    You saved like One and Half days of mine. Thank you

  • @norrisleung666
    @norrisleung666 6 лет назад +24

    Very nice. Learnt a lot. I think the example can be more clear if the input and output have distinct value. The polymial passing through (1,2) (2,3) (3,5), and we are considering intervals [1,2] and [2,3] (on x axis), which is kind of confusing since one may think the "2" comes from the point (1,2) and the "3" comes from the point (2,3).
    Anyway, great video!! Thank you

    • @the-Math-guy
      @the-Math-guy  6 лет назад +3

      Thank you Norris, that is great feedback I will take that into account if I get a chance to revise this video at some point. Thank you

    • @norrisleung666
      @norrisleung666 6 лет назад

      @@the-Math-guy thanks for replying. Another question, i was wondering, using this method, will C0 always be 0?? Since for and point (a,b), S0(x) should have a term d0(x-a)^3, when wr apply the boundary condition, [S0(a)]´´=0 will always imply 2c0=0.

    • @akkismart1149
      @akkismart1149 6 лет назад

      @@norrisleung666 Possibly c0 = 0 provided it satisfies the condition of natural spline. Please correct if I am wrong. check ruclips.net/video/wMMjF7kXnWA/видео.html

    • @kevinweitgenant5300
      @kevinweitgenant5300 4 года назад +1

      wow. thank you. I was confused exactly by this!

    • @spudr2192
      @spudr2192 3 года назад +1

      Yup, same here, this confused me too!

  • @forzahorizon4eliminator206
    @forzahorizon4eliminator206 2 года назад

    what the hell you've helped me soo much and its only today that i realized i didn't subscribe to your channel wow am sorry...and thanks for the work you are helping us a lot and making things easy for us we appreciate man

  • @gontle0118
    @gontle0118 Год назад

    Thank you so much.I was struggling to understand but after your clear explanation I think I’m ready for the test👍

  • @davidirimia6463
    @davidirimia6463 4 года назад +6

    You are a hero! My homework was this exact same exercise, same parameters! :D

  • @timharig
    @timharig 7 лет назад +11

    Underrated. Name looks foreign but speaks perfect English. All of the other videos are by Indians with strong accents. Good explanation. Please vote up.

    • @norrisleung666
      @norrisleung666 6 лет назад

      The "s" sound is ear piercing though...

  • @yasserothman4023
    @yasserothman4023 3 года назад +2

    @10:09 the -1 should be in the fourth column under c1 not b1

  • @Hansly_rz
    @Hansly_rz 5 лет назад +4

    really helpful... calculus one professor had us do a project explaining cubic spline which is, in my opinion, way off the scale here. You saved my day thank you so much

  • @helenab.6893
    @helenab.6893 5 лет назад +1

    Thank you sooo much!!! I have to write a program for Cubic Splines for university but I had no clue about Cubic Splines. This was so helpful :)

    • @rimshaalam2499
      @rimshaalam2499 5 лет назад

      Hi Halena! Can you plz help my why we take only two intervals means 3 points 1 2 3 what about 5... Why we don't take this one...
      And how S0(1) is equal to 2?
      Plz reply me must...

    • @pauliusvainoras7787
      @pauliusvainoras7787 4 года назад

      @@rimshaalam2499 There are three points and in order to connect them we need to functions ( in previous video it's explained ). S0(1)=2, because as you see S0(x)=a0+b0(x-x0)+c0(x-x0)^2+d0(x-x0)^3, using the given data ( point (1;2) ) we know that if we input 1 we get 2. So this point is starting point so we can call it x0=1; y0=2. So function S0(x) functions between x0 and x1. So as we input x=1 to S0(1) we get =a0+b0(1-1)...=a0; also we know from data that this function node is (1;2), so S0(1)=y0=2

  • @poppyblop484
    @poppyblop484 3 года назад +2

    Sorry to ask, but do you wear a cape? If not, you should, because ur a hero

  • @Drunk_iitian
    @Drunk_iitian 4 года назад

    love you...you are the superhero...i was actually searching for this equation...

  • @surjandogra6512
    @surjandogra6512 2 года назад +1

    Done very nicely. Only one suggestion: Show the final results in plot form and indicate on the plot different polynomials being used in different segments. Then emphasize smooth interpolation curve is created and if there are overshoots/undershoots, talk about that too. Nicely done. Thanks.

  • @thiripimallarapu7227
    @thiripimallarapu7227 4 года назад +1

    OMG! Iam actually searching for this exact question.so,my problem is over☺☺.Thank you so much!👌👌

  • @lordhazimuka5232
    @lordhazimuka5232 3 года назад +3

    Maybe you can also tell us how you solved the augmented matrix. The rest i understand though.

  • @booysenbafana4358
    @booysenbafana4358 5 лет назад +2

    Thank you so much... I'm going to nail my exam today

  • @benm9355
    @benm9355 4 года назад +2

    This video was incredibly helpful, thank you!

  • @sergebyusajabo2138
    @sergebyusajabo2138 5 лет назад +1

    Good job bro. Now I understand how it is done.

  • @catherinehiggins4526
    @catherinehiggins4526 3 года назад

    Great video man, at 8:13 why is the S"(3) and not S"(2) ? Thanks

  • @YuzuAndGin
    @YuzuAndGin 4 года назад +2

    Great video and clear explanation, would have really appreciated if you had simplified down the polynomials at the end.

  • @professoraltamir
    @professoraltamir 2 года назад

    Congratulations teacher for the explanation

  • @adamm4942
    @adamm4942 4 года назад +2

    How do you get the boundary conditions for s''(both 0 and 1)? is this a natural polynomial? I thought that would only work for the first derivatives being = to 0

  • @syedabishosainrizvi7817
    @syedabishosainrizvi7817 3 года назад

    بھای دل جیت لیا، زبردست

  • @sidrarashid5594
    @sidrarashid5594 3 года назад

    I Am very grateful to u very well explained and clear my topic

  • @ajiwibowo8736
    @ajiwibowo8736 3 года назад +1

    why is the second derivatiive equals to zero? doesnt it supposed to be equal each other i.e S''1(1)=S''2(3)?

  • @anthonyng3705
    @anthonyng3705 5 лет назад +2

    Please help, why we just have 3 points, what s about point number 5?

  • @juustgowithit
    @juustgowithit 6 лет назад +5

    You’re my savior

  • @ferdzcastle
    @ferdzcastle 3 года назад +4

    Great explanation. You have just accidentally interchanged the element (4,3) with element (4,4) of coefficient matrix.

  • @izen4276
    @izen4276 4 года назад

    7:18 hard to understand how So''(1)=0?

  • @nourailham2544
    @nourailham2544 2 года назад

    What about the convergence of the estimator cubique spline !
    Do you have any video or reference explain that?!!!

  • @nakshathra5149
    @nakshathra5149 Год назад

    I don't understand how u got equation 2 at 5:49

  • @unsignedperson476
    @unsignedperson476 6 лет назад

    You save me. Clear explanation thanks for the tip

  • @SongKangHyeon
    @SongKangHyeon 3 года назад

    what a nice explanation! thanks

  • @packardrazor9382
    @packardrazor9382 4 года назад

    Thanks bro... It's amazing explanation

  • @nozomuitot
    @nozomuitot Год назад

    Where did the 2c0 + 6d0 = 2c1 equation in the construction of clamped cubic come from

  • @Booka0000
    @Booka0000 2 года назад +1

    Man, I love you ❤

  • @DrWillWood
    @DrWillWood 3 года назад +1

    so useful thank you!

  • @yasserhadj3335
    @yasserhadj3335 3 года назад

    please what is the difference between the natural and the cubic spline in terms of interpolation? does one have a bigger error than the other?

  • @enriquesahidtenoriorodrigu8979
    @enriquesahidtenoriorodrigu8979 2 года назад +1

    Thx for everything my friend.
    You just got a error in yout matrix, in the 4th row you put [0,3,-1,0,0]... but is [0,3,0,-1,0] cause C1 = -1, not B1

    • @rememberrocko
      @rememberrocko 2 года назад

      THANK YOU! I had tried so many online matrix calculators wondering what I was missing.

  • @hoangthientamvuong8238
    @hoangthientamvuong8238 6 лет назад +4

    Thanks so much, it is super helpful. But I think the 4th row is not correct hmmm maybe?

    • @hoangthientamvuong8238
      @hoangthientamvuong8238 6 лет назад

      Of the matrix I mean

    • @the-Math-guy
      @the-Math-guy  6 лет назад

      You are correct please see the little "i" in the right corner of the video there is a correction video

  • @tabbycutex
    @tabbycutex 3 года назад

    how can I solve the matrix formed on a calculator to get the values of the unknowns?

  • @sohaibkhan779
    @sohaibkhan779 7 лет назад +4

    thankyou... it helped me.. well explained

  • @ajipboy
    @ajipboy 6 лет назад +1

    YOU SAVE ME ! Thanks a lot!

  • @chrischoir3594
    @chrischoir3594 4 года назад

    great video, but I'm just curious where did you learn this? is there some book I can buy?

  • @pavelperina7629
    @pavelperina7629 3 года назад

    Can you make links between some videos, it's hard to navigate from basics to next part and vice versa when videos are 4 years old.

    • @the-Math-guy
      @the-Math-guy  3 года назад

      Thanks for your suggestion actually if you go to the playlist for this course all videos are in sequence.

  • @Enola8866
    @Enola8866 2 года назад

    why we have not taken the interval (3,5)???

  • @rimshaalam2499
    @rimshaalam2499 5 лет назад

    Can you plz help me about why you don't take interval (3,5)....and how S0(1) is equal to 2....plz reply me..

  • @speedmetalmassiah567
    @speedmetalmassiah567 5 лет назад +3

    Thanks for the video, but I don't see how my professor expects us to solve a Cubic Spline, Quadratic Spline, Lagrange Polynomial, and Newton Polynomial in 1 hour.

    • @the-Math-guy
      @the-Math-guy  5 лет назад +1

      Oh my sorry to hear that. Perhaps he or she thinks you are all geniuses.

    • @firstsecond8999
      @firstsecond8999 5 лет назад +2

      Guess I'm not the only one who thinks so too
      During maths exams, the time allocated does not include the time to go over the work to correct errors and that is not a good thing

  • @nitnelavspetorials
    @nitnelavspetorials 4 года назад

    If I have to find a Quadratic Spline and I am also given the 3 points, do I have to calculate the second derivatives?

    • @nitnelavspetorials
      @nitnelavspetorials 4 года назад

      I found myself. I also knew S0'(-1) = 0, that's why I didn't need the second derivatives. VERY USEFUL VIDEO. THANKS FOR POSTING IT

  • @ummehani4344
    @ummehani4344 4 года назад

    thank you so much great work.

  • @realberkeboy
    @realberkeboy 2 года назад

    hello first of all thanks for the video. But i didnt understand how did you find the values of b0 d0 b1... after writing the matrices. Can you explain to me? Thank you

    • @sandisosenzo
      @sandisosenzo 2 года назад

      I haven't tried it myself yet but row reduction should give u the answer u need

  • @Queen-fl7su
    @Queen-fl7su 2 года назад

    Sir plz give me one lectures of cubic non polynomial spline by differential equations

  • @donnaguerrero5588
    @donnaguerrero5588 4 года назад

    Good day! Can you please help me to solve having 4 data points?

  • @the-Math-guy
    @the-Math-guy  7 лет назад

    Thanks Tim, appreciate it!!

    • @capitalp761
      @capitalp761 6 лет назад +1

      how do we find the values of other unknowns? the video is great but not complete.. please share

  • @lancelofjohn6995
    @lancelofjohn6995 2 года назад

    Nice lecture!

  • @sanakhanbano
    @sanakhanbano 6 лет назад

    can we use the direct cubic interpolation instead of this one . can you upload direct method @themathguy

  • @Cetra29
    @Cetra29 7 лет назад

    Hi, your video is awesome! It is pretty much the only thing that really helps me through this topic. I am a total newbie when it comes to splines though and need this knowledge only for one single exam and right now am really troubled when it comes to knowing when and how to use certain things. Any help would be greatly appreciated. You have used an example with three points where two overlapping spots existed. What about three points where only one point overlaps. Do I have to approach this differently or can it be done exactly the same way? I do not understand this right now but I think just doing it the same way might not lead to a satisfying conclusion? Or maybe it still is right but that's the problem, as much of a beginner I am here, I cannot really say what's adequate here.
    Thanks in advance!

    • @the-Math-guy
      @the-Math-guy  7 лет назад

      Hi, thank you for the message and glad you found the video helpful. Ok in answer to your question first can you give me an example of what you have in mind for the three points with 1 overlap?

    • @Cetra29
      @Cetra29 7 лет назад

      Hi, wow, thank you for answering so fast. Actually I think I already found a way to solve it by understanding your video a bit more, so getting more used to the basics and then going back to check what was given to us formula-wise for the exercise. Basically it is an example where (x0, y1), (x1,y1), (x2, y2) had identical y0 and x1 like in your example the "2" is but not an identical y1 and x2 like in your example the "3" is (that is what I meant with "overlapping"; I just meant identical numbers as it seemed so important). I was wondering if its still possible to do stuff the same way but when trying out a bit more and understanding a bit more of what was given to me I saw that it is all about the same process. But definitely thank you for providing us with a video! It definitely helped!

    • @the-Math-guy
      @the-Math-guy  7 лет назад

      Actually that has no effect on the method in my example that is just a coincidence. The method will work for any set of values but the place where the overlap is the x values. So when you connect say (x1,y1), (x2,y2) and (x3,y3) there are two splines and (x2,y2) is a part of the both splines thats the only thing to keep in mind when it comes to repeating values. Hope this makes sense. You are most welcome

  • @hosseinkorani6807
    @hosseinkorani6807 5 лет назад

    Thanks man! Helped a lot:))

  • @Dan-id8uy
    @Dan-id8uy 5 лет назад

    Nicely done!

  • @byD3stroy
    @byD3stroy 6 лет назад

    Hi, thank you for this video!
    I've a question, how do you get the values of b0, d0, b1, etc when you got the matrix?

  • @AbdulQadeer-jf7iw
    @AbdulQadeer-jf7iw 4 года назад

    Can anybody tell why we have not taken [3,5]

  • @freezinfire
    @freezinfire 2 года назад

    Thank you very much sir.

  • @sarakisafa7283
    @sarakisafa7283 3 года назад

    sir, you have made a mistake, when we put fourth equation in the matrix then (-1) will come right down the (c1) not under the (b1).

    • @the-Math-guy
      @the-Math-guy  3 года назад

      Yes thank you I already posted a correction as a link to this video please see ruclips.net/video/uRjY0JaxyQc/видео.html

  • @dellarima8927
    @dellarima8927 5 лет назад +1

    you got something wrong there, instead of c1, you write it in b1 column

  • @baldEagle_
    @baldEagle_ 5 лет назад

    cant Thank you!! in words.

  • @johng5295
    @johng5295 6 лет назад +1

    Thanks in a million!!!!!!!!!!!

  • @Adrian-sr2bu
    @Adrian-sr2bu 4 года назад

    nice explanation

  • @musafir1068
    @musafir1068 6 лет назад

    how to implement it in Matlab for n number of data points?plz, make a video on this also.

  • @gabrielalbu608
    @gabrielalbu608 6 лет назад

    Can you give me the implementation of this algorithm in Matlab ?

    • @the-Math-guy
      @the-Math-guy  6 лет назад

      Well actually Matlab has a function coded that can do splines (quite advanced stuff). Now if you mean you want to write in Matlab or python from sort of scratch that is; well you can get a lot of pseudocode, actual code etc on the web.

    • @gabrielalbu608
      @gabrielalbu608 6 лет назад

      yeah i got the code from the web,thanks anyway for your fast response.

  • @EG101ify
    @EG101ify 4 года назад

    Why is s''(1) equal to zero?

    • @MUmar-tq7pr
      @MUmar-tq7pr 4 года назад

      it is the boundary condition for natural spline

  • @abhilamsal7185
    @abhilamsal7185 6 лет назад

    Don't we need four points in order to define a cubic function?

    • @the-Math-guy
      @the-Math-guy  6 лет назад

      I think you are mixing things here. That is only one way to determine a cubic function. There are various other ways and certainly for cubic splines there is no such requirement.

    • @abhilamsal7185
      @abhilamsal7185 6 лет назад +1

      oh, so cubic functions and splines are a bit different huh! thanks for clearing things up, I really appreciate it.

  • @Methzvamp
    @Methzvamp 4 года назад

    Thank you so much

  • @SuperDeadparrot
    @SuperDeadparrot Год назад +1

    The 4th line of your matrix is wrong!

    • @the-Math-guy
      @the-Math-guy  Год назад +1

      Yes thank you I already corrected that in the video that was in more... in any case you can see it here ruclips.net/video/uRjY0JaxyQc/видео.html

  • @nalluribharadwaj5277
    @nalluribharadwaj5277 6 лет назад

    the 4th row in the matrix as explained is wrong...

    • @the-Math-guy
      @the-Math-guy  6 лет назад

      Yes thank you please see the little i in the right corner of the video for the correctiom

  • @TScreator777
    @TScreator777 5 лет назад

    Thanks great help

  • @krushnasai3249
    @krushnasai3249 7 лет назад

    d0 value = -1/2 i think

    • @the-Math-guy
      @the-Math-guy  7 лет назад

      Krushna sai kumar Reddy. Thanks for your question but the solution is correct do =-1/4 not as you suggest.

  • @sujatamaiti4903
    @sujatamaiti4903 4 года назад

    Thank you sir

  • @Cupekacke
    @Cupekacke Год назад

    now im more confused thx

  • @pablocaiza.
    @pablocaiza. 4 года назад

    gracias amigo

  • @a_smile55
    @a_smile55 3 года назад

    Thanks😄

  • @Adam_mohammed_
    @Adam_mohammed_ 2 года назад

    بطتنا بطت بطن بطتكم تقدر بطتكم تبط بطن بطتنا مثل ما بطتنا بطت بطن بطتكم!

  • @avibank
    @avibank 7 лет назад +1

    Awesome

  • @timbraunton3677
    @timbraunton3677 4 года назад

    legend

  • @Svx_6
    @Svx_6 5 лет назад

    Cool
    Thanks allot

  • @arifandchange
    @arifandchange 4 года назад

    dora dan geldim bn

  • @kimosopjemutainasaline3541
    @kimosopjemutainasaline3541 9 месяцев назад

    You are too fast one can't track where you are obtaining your figures

  • @joeysmith7021
    @joeysmith7021 5 лет назад

    Should pick a smaller example next time or another video with a smaller example. That is very messy

    • @aspiringmodernistchef
      @aspiringmodernistchef 5 лет назад

      You kidding me? This one only has 3 points, that's the "smallest" example you can have for cubic interpolation. Any "smaller" would just be 2 points, so how on earth do you do cubic interpolation on 2 points? ROFLMAO

  • @gokselkucuksahin
    @gokselkucuksahin 5 лет назад

    *L E A R N T O W R I T E F I R S T*

  • @mahithkumar2603
    @mahithkumar2603 4 года назад +4

    Thank you so much! You made a good explanation of cubic spline. I suffer a lot from understanding the concepts in numerical analysis and using Mathematica. I hope that I could have found your videos earlier for this semester.

  • @ahmetkarakartal9563
    @ahmetkarakartal9563 2 года назад

    thank you so much