I can use fortran, C, C++, matlab, etc. to do these projects. But the thing is my knowledge of the first 3 languages is poor. I tried self learning it, but it wasn't easy. So I use matlab. Regardless of any languages being used, I would still have to put it in matlab. The professor wants everyone to do these types of problems the primitive way.
So far I finished part a and b and only linear spline of part c. Sigh my sweet weekend is taken away by this homework.
I actually don't know the Thomas Algorithm too. The stuff was covered in class but the TA or professor never mentioned anything about that.
Anyway for the splines. Quadratic spline is defined by
y(i)=a(i)+b(i)*(x-x(i))+c(i)*(x-x(i))^2
where the parenthesis is meant y_{i} and same for a,b,c and x.
so at x(i), y(i)=a(i)
which satisfies the first condition.
at x(i+1),
y(i+1)=a(i)+b(i)*(x(i+1)-x(i))+c(i)*(x(i+1)-x(i))^2
and the derivative of y(i+1) is
y'(i+1)=a(i)+b(i)+2*c(i)*(x(i+1)-x(i)
for y' to be continuous, y'(i+1)=b(i+1)
now I have no idea how to find b(i+1),b(i) and c(i). I think dx=(x(i+1)-x(i)) and dy=y(i+1)+y(i) are given so there are 3 unknowns to find.
There is another method to do this. Using the forward difference and backward difference and then average the two. Again I have no idea how to do that either. At least not in matlab.
Is it possible to transfer your work in mathcad to matlab?