MATLAB Help - Cubic Splines
Вставка
- Опубліковано 14 жов 2024
- Finally did Cubic Splines. This is a super long video but I finally got it. If you need help let me know.
Root directory of repo
github.com/cmo...
As of 4/2021 this link below works.
github.com/cmo...
That was a great video. I am a noob at coding but I knew the mathematics behind it and couldn't find a way to apply it. Your video gives a direction on how to think while coding. Was a big help, thanks!
Thank you, it was really nice to see someone else's thought train while coding. Also, really laughed at the truck and yard work stuff :D They were as if they were put for comedy purposes :)
I Love you man😁😘 You saved so much time😅
Thank you so much
Hi thanks for this upload. Very useful. I would like to ask if you are familiar with the PCHIP function on MATLAB and if it works on the same principle as this? From what I understand, the main difference between the various cubic spline algorithms is distinguished by the way the value of the first derivative, or gradient at a point is calculated or specified.
I'm not familiar with that method
Great video - Thank you so much for sharing! Will you please give us the link where we can get this code?
gitlab.com/Montalvo/MATLAB
@@CarlosMontalvo251 Thank you so much indeed! - Very useful!
Very interesting!
How would the code changed if you solved for the coefficients with an augmented matrix and row operations to get RREF?
Change the line that says
coeff = inv(H)*K
to
R =rref([H,K])
coeff = R(:,end)
I think that will work.
is this is for natural boundary conditions? how different would it be if it was the case where the first derivatives at the endpoints are known?
I guess you would just have to rederive the equations that I showed in the pdf. I don't think it would be too different.
Ok thanks! And great video!
Hii ,can u make a video on " draw a NURBS curve by calling b spline basis function "...i think it will helpful of many student
Can you post a link to the method?
@@samiachaudhuri257 Thanks for the link. Unfortunately I'm not familiar with that method.
sir, how do we get the data-points , I have a robot which will start from 0 with initial v=0, a=0 , t=0 and then fv=0, fa=0 , t=10
I see the values given to me like this but how is it derived.
ankle_motion = deg2rad([-7.5 10 10 5 0 -10 -7.5]');
knee_motion = deg2rad([10, -5, 2.5, -10, -10, 15, 10]');
hip_motion = deg2rad([-10, -7.5, -15, 10, 15, 10, -10]');
I think you're looking at the wrong video. If you have the initial conditions of the robot you need the equations of motion and then you need to integrate those EOMS with an Rk4 integrator or ode45
@@CarlosMontalvo251 Sir , I need help on this , I think a 5th order polynomial equation is used but how do we get to know that it moves from -7.5 to 7.5 and how do we get the middle values.
Are you trying to interpolate the knee-motion data set? If so you just need to use linear, quadratic or cubic interpolation
@@CarlosMontalvo251 Sir I want to understand if I have a 2 link robot (D pendulum)with 2 deg of freedom , what should be the initial angle between the joints and how do we derive the way points as described above. Please suggest me, I have solved the polynomial equation but how and where to start the values is a difficult task, Please send me an email at sudhansumtripathy@gmail.com I will send you a simscape model which I have created so you can have a view on it (matlab2017) or I will save it in a lower version
Ok now you're talking about robotic manipulation and pose estimation. This is not in my line of work. Like I said you need to go look at another video.
sir, two point boundary value problem by using cubic spline. have any code??
This is the only code I have related to Cubic Splines github.com/cmontalvo251/MATLAB/blob/master/Screen_Cast_Codes/Interpolation/cubicsplines.m
Can I evaluated more then 4 points by using this code??
@@118mutasimkouser8 The code will work for any number of data points.
Sir, I want the code for Cubic bezier's surface with 16 points in Matlab, I am a research scholar in manufacturing
Here's the code I used for Cubic Splines github.com/cmontalvo251/MATLAB Cube Bezier Curves sounds like something different.
Meraj may I know your specialization please
My specialty is in Dynamic Simulations and Control of Multibody Aerospace systems.
@@CarlosMontalvo251 m.tech in cad/cam is useful or not sir
@@CarlosMontalvo251 404 not found :(
How can I do this code for 12*12 matrix instead of 10*10
I don't think there would be any change to the code. The code uses the length() and size() functions to adequately handle any size matrices. Perhaps I'm mistaken?
the equation
UK [ði ɪˈkweɪʃən]
US [ði ɪˈkweɪʒən] - Why /ʒ/ ????????
I don't think the language translator came through correctly I only see random characters
where can I download the code? thanks
gitlab.com/Montalvo/MATLAB_Games.git
Is there a way I can see the polynomial at the end of the program instead of the graph?
@@felipeobando7196 Not really. The polynomial is a set of polynomials that intersect all of them. you basically have N-1 equations of the form ax^3 + bx^2 + cx + d. There's not a way to see "the" polynomials rather you have a set of polynomials.
How do I interpolate for a specific X-value?
At the bottom of the code if you change xsplines to one number I think it will work.
@@CarlosMontalvo251 Natural Cubic Spline Interpolation
Choose x0, x1, x2, x3 and y0, y1, y2, y3. Write an .m file to compute the third order polynomials for the intervals [x0, x1], [x1, x2], [x2, x3]. Plot the functions and the points xi, yi on the same figure. Figure should clearly show that the polynomials pass through the points. CAN YOU PLEASE HELP ME ??
@@alperensglm1 I can help you. My youtube video above and the linked code on github will solve your problem with a few minor tweaks.
Monte Carlos Thamk youuuu🙏 which headline does it include cubic splines? I didn’t find them unfortunatel, sir
@@CarlosMontalvo251 Actually, i didn't find the cubic interpolation headline among of your github files. it's much important to me about my homework process.
sir, i need MATLAB code for IEMD, can you please help , i can't find anywhere, it would be really helpful, i am a research scholar
What is IEMD?
@@CarlosMontalvo251 Image empirical mode decomposition, it's 2D empirical mode decomposition
@@ashishsingh2911 Unfortunately I have never heard of that before.
Ashish Singh that is why is called research, do your research!
I can't find the code itself. Can you please send it here
github.com/cmontalvo251/MATLAB/blob/master/Screen_Cast_Codes/Interpolation/cubicsplines.m
Hello Dr. Montalvo,
The link you provided for the Cubic spline code is not valid I think. I mean this one:
gitlab.com/Montalvo/MATLAB_Games.git
I apologize. I moved everything to github a while back. github.com/cmontalvo251/MATLAB