MATLAB을 이용한 알기 쉬운 수치해석) 5장 8번
t = [40 48 56 64 72 80];
current = [1.36 1.67 2.12 2.36 2.72 3.19];
plot(t, current)
disp(spline(t, current, 75));
(b)에서 3차 자연 스플라인 보간법을 이용하기 위해선 csape 함수를 사용해야 한다.
https://kr.mathworks.com/matlabcentral/answers/387177-plot-natural-cubic-spline
Plot Natural Cubic Spline - MATLAB Answers - MATLAB Central
Does Matlab have a built in code to plot a 'Natural' Cubic spline? I was using pp = spline(... , but have realised this is not a 'natural spline. I have also tried pp = csape(x,y,'second'), where x and y are my nodes, but im not sure this is right either.
kr.mathworks.com
t = [40 48 56 64 72 80];
current = [1.36 1.67 2.12 2.36 2.72 3.19];
plot(t, current);
disp(spline(t, current, 75));
pp = csape(t, current, 'variational');
pp2 = finder(pp, 75);
disp(pp2);