MATLAB Answers

Invalid use of operator

6 views (last 30 days)
dchaox on 30 May 2020
n=2; %mol
V=1; %L
a=5.536; %L^2 bar/ mol^2
b=0.03049; %L/mol
R=0.08314472; %L bar/ K mol
% Find the temperature using the ideal gas law
% Find the temperature using Van der Waal's equation
T_VW=(P +((n^2)*a)/V^2)*(V-n*b)/(n*R)
Error in solution: Line: 1 Column: 1
Invalid use of operator.
Help I don't know what I did wrong lol


Show 1 older comment
dchaox on 30 May 2020
Huh that’s interesting, yup that’s the full code
dchaox on 30 May 2020
Lol nevermind it worked when I retyped the code using my phone. Thanks for the help though!
Carlos Alejandro Peñuelas Angulo
Haha its ok. It would be an easy accepted answer. See ya.

Sign in to comment.

Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!