Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

solving this issue is highly required, plz show steps .. if you need more point

ID: 638426 • Letter: S

Question

solving this issue is highly required, plz show steps .. if you need more point , I can offer that

C) Write a single MATLAB script that computes the gas temperature using both the ideal gas law

and the van der Waals equation.
? Use variables to hold results and important constant values.
? For this script, you are allowed to use short variable names (e.g., P) since the context of
the equations is well known to physicists.
? Make the script display text before each value to identify which equation was used.
? If you like, you can use just the disp function for basic output. If you want more control,
read about the advanced fprintf function.
? Save your script file using this name: hw2p4.m

Explanation / Answer

function P = idealP(V)

computes pressure using the ideal gas law
for 1 mole
assumes the temperature is 293

R = .08206;
T = 293.0;
n = 1.0;
P = n*R*T./V;

van der Waals equation
(P + n*2 a/V*2 )(V - nb) = nRT