I need to solve this using matlab.
Code: MainV.m
clc
clear
%%initial guess
xl = 1;
xu = 3600;
fl = funVol(xl);
fu = funVol(xu);
%check if signs of fx and fu are different
if (fl*fu > 0)
error('Initial guesses should have different signs');
end
%%iterative solution using bisection rule
maxIter = 100;
tolX = 1e-6;
for i = 1:maxIter
err = abs(xl - xu);
xNew = (xl + xu)/2;
fNew = funVol(xNew);
if(fl*fNew > 0)
xl = xNew;
fl = fNew;
else
xu = xNew;
fu = fNew;
end
if (abs(err) < tolX)
break;
end
end
disp("Smallest root V0 = "+num2str(xNew));
Code: funVol.m
function fvol = funVol(V)
R = 83.14;
T = 350;
P = 9.46;
a = 2.9*10^8;
b = 807;
fvol = V^3 - R*T/P *V^2 - (b^2 + b*R*T/P - a/(P*sqrt(T)))*V - a*b
/(P*sqrt(T));
end
Output:
I need to solve this using matlab. 1) ) Cubic equations of state can be used to establish the pressure(P)-volume(V)-tem...
1. The Redlich-Kwong equation of state is given by P=_RT___ A _ _ V-RI2,, - 0.0866 - where 4-0.42748RT - B - P (The R-K constants can be calculated from the critical temperature and pressure of the gas.) This EOS was introduced in 1949 and is adequate for calculations of gas phase properties when P, </2 T, a) Derive an expression for the work associated with an isothermal reversible volume change of a R-K gas between two volumes V, and...
I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this paper and some conclusions and contributes of this paper. I need this for my Finishing Project so i need this ASAP please ( IN 1-2-3 HOURS PLEASE !!!) Budgetary Policy and Economic Growth Errol D'Souza The share of capital expenditures in government expenditures has been slipping and the tax reforms have not yet improved the income...