Invalid use of operator

1 view (last 30 days)
dchaox
dchaox on 30 May 2020
Edited: Alejandro Peñuelas on 30 May 2020
P=220;
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
T_ideal=(P*V)/(n*R)
% 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
  4 Comments
dchaox
dchaox on 30 May 2020
Lol nevermind it worked when I retyped the code using my phone. Thanks for the help though!
Alejandro Peñuelas
Alejandro Peñuelas on 30 May 2020
Edited: Alejandro Peñuelas on 30 May 2020
Haha its ok. It would be an easy accepted answer. See ya.

Sign in to comment.

Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!