So this is what I have so far now. I'm trying to use an input function so you can choose what element you want, and apparently I'm doing something wrong... or maybe I'm using an input function in the wrong way, but every time I type one of my elements it says it doesn't have a value.
T = 300 ; V = 20; R = .08206;
myelement = input('My element: ');
switch (myelement)
case 'he'
a= .0341 ; b = .0237;
case 'hydrogheen'
a = .244 ; b = .0266;
case 'oxygen'
a = 1.36 ; b = .0318;
case 'chlorine'
a = 6.49 ; b = .0562;
case 'carbondioxide'
a = 3.59 ; b = .0427;
end
P = (R*T)/ (V - b) - a / V.^2;