SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE SOLVE USING MATLAB ONLY,
ID: 701449 • Letter: S
Question
SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE
SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE
SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE
SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE
Experimental data of relative vapor pressure of glycerol-water mixtures at 20°C are as follows: Weight fraction of glycero0. 0.25 0.350.356 0.479 0.5 Relative vapor pressure Weight fraction of glycero0.6 0.6480.750.786 0.83 0.921 Relative vapor pressure 0.737 0.695 0587 0.535 0.446 0.275 0 1 0.942 0.923 0.8870.885 0.8250.814 Perform a polynomial regression to obtain a model for relative vapor pressure as a function of weight fraction of glycerol. Then, estimate the relative vapor pressure for a mixture containing 10 wt% glycerol. Note: You need to investigate the order of polynomial that best fits the data.Explanation / Answer
Matlab code :
wf= [0 0.2 0.25 0.35 0.356 0.479 0.5 0.6 0.648 0.75 0.786 0.83 0.92 1]';
rvp=[1 0.942 0.923 0.887 0.885 0.825 0.814 0.737 0.695 0.587 0.535 0.446 0.275 0]';
[vp, gof]=fit(wf,rvp,'poly4');
plot(vp,wf,rvp);
xlabel('weight fraction')
ylabel('relative vapor pressure')
vp % gives polynomial with coefficient
vp(0.1) % value of vapor pressure at 10 percent glycerol
Results :
vp =
Linear model Poly4:
vp(x) = p1*x^4 + p2*x^3 + p3*x^2 + p4*x + p5
Coefficients (with 95% confidence bounds):
p1 = -2.038 (-3.019, -1.058)
p2 = 2.428 (0.4383, 4.417)
p3 = -1.296 (-2.593, 0.001758)
p4 = -0.08361 (-0.3766, 0.2093)
p5 = 0.9986 (0.9778, 1.019)
ans =
0.9795
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.