Just to let you know this is the first time that iam using matlab and have very basic knowledge, if any at all ahah. But basically i have to find the P constant at volume changes between 3 and 5 litres, and at two temperature constants 372k and 472k.
Yet the way i have put it into matlab is does not seem to work and help on this would be appreciated, ill put what ive writen below.
%Ideal gas equation
% a program for calculating the pressure distribution in the ideal gas equation
%define the tempurature
T1 =372; % units of temperature in kelvi
T2 =427; % units of temperature in kelvin
% define R
R=0.08206; % units L.atm.mol^-1
% define n
n=1;% define the array of volume in litres
V=3:.01*5:5;% calculate the pressure disribution (when P is the subject in the ideal % gas equation)
for j=1:10 P1(j)=T1*R*n/V(j); P2(j)=T2*R*n/V(j);end% plot the two graphs on the one axis
plot(3,P1)holdplot(V,P2)
Best Answer