Академический Документы
Профессиональный Документы
Культура Документы
1606826893
Tugas Interpolasi
17.11 The following data for the density of nitrogen gas versus temperature come from a table
that was measured with high precision. Use first – through fifth- order polynomials to estimate
the density at temperature of 330 K. What is your best estimate? Employ this best estimate and
inverse interpolation to determine the corresponding temperature.
K 200 250 300 350 400 450
Density, 1.708 1.367 1.139 0.967 0.854 0.759
3
Kg/m
Answer:
1. Hasil Script:
clear all;
close all;
figure(2)
p22=a0+a1.*(x-x0)+a2.*(x-x0).*(x-x1)
plot(x,p22);
grid on hold on
plot(xt,p2,'ob','markersize',10,'markerfacecolor','r')
figure(3)
p33=a0+a1.*(x-x0)+a2.*(x-x0).*(x-x1)+a3.*(x-x0).*(x-x1).*(x-x2)
plot(x,p33);
grid on
hold on
plot(xt,p3,'ob','markersize',10,'markerfacecolor','r')
figure(4)
p44=a0+a1.*(x-x0)+a2.*(x-x0).*(x-x1)+a3.*(x-x0).*(x-x1).*(x-x2)+a4.*(x-
x0).*(x-x1).*(x-x2).*(x-x3)
plot(x,p44);
grid on
hold on
plot(xt,p4,'ob','markersize',10,'markerfacecolor','r')
figure(5)
p55=a0+a1.*(x-x0)+a2.*(x-x0).*(x-x1)+a3.*(x-x0).*(x-x1).*(x-x2)+a4.*(x-
x0).*(x-x1).*(x-x2).*(x-x3)+a5.*(x-x0).*(x-x1).*(x-x2).*(x-x3).*(x-x4)
plot(x,p55);
grid on hold on
plot(xt,p5,'ob','markersize',10,'markerfacecolor','r')
2. Hasil screenshoot command window
3. Hasil Grafik