You are on page 1of 2

Console

--> A = [1 0 0 0; 0 6 1 0; 0 1 6 0; 0 0 0 1]
A =

1. 0. 0. 0.
0. 6. 1. 0.
0. 1. 6. 0.
0. 0. 0. 1.

--> B = [0; -6; 1.5; 0]


B =

0.
- 6.
1.5
0.

--> I = inv(A)
I =

1. 0. 0. 0.
0. 0.1714286 - 0.0285714 0.
0. - 0.0285714 0.1714286 0.
0. 0. 0. 1.

--> Ci = I*B
Ci =

0.
- 1.0714286
0.4285714
0.

--> x = [1,3,4,6];

--> y = [2,4,3,2];

--> d = splin(x,y);

-->plot(1:0.01:6,interp(1:0.01:6,x,y,d))

-->interp(3.5,x,y,d)
ans =
3.5625

You might also like