W05 Homework3 Solutions
30
25
20
15
10
5
-10 0 10 20 30 40 50
0
Temparature C
Mechatronics Systems in Automotive Engineering
6 Week 04 Homework - Solutions
% Matlab drawing graphic program OK
X = [-10 0 10 20 25 30 40 50 ];
Y = [44.6 28.1 18.2 12.1 10 8.27 6.4 5.7];
X0 = 0;
n = 100;
f = 0.1;
x = linspace(min(X),max(X),n);
y = interp1(X,Y,x,'spline');
xt = X0+(0.1*(max(X)-min(X))*[-1 0 1]);
m = diff(y)./diff(x);
m = [m, m(end)]; % so just add one at the end